mintywalker's Journal mintywalker's use Perl Journal en-us use Perl; is Copyright 1998-2006, Chris Nandor. Stories, comments, journals, and other submissions posted on use Perl; are Copyright their respective owners. 2012-01-25T02:40:42+00:00 pudge Technology hourly 1 1970-01-01T00:00+00:00 mintywalker's Journal Moose sub types : one module or another <p>My initial problem:</p><p> <b>How to tell Moose that an attribute was an instance of My::Class OR My::Test::Class.</b> </p><p>Whaddaya know, there is more than one way to do it<nobr> <wbr></nobr>;)</p><p>Seeing as how I got a lot of help from #moose on I thought I'd write up my findings<nobr> <wbr></nobr>...</p><p> <a href="">How to create your own Moose sub types in Perl</a> </p><p>. (There is a way to do it without creating a sub-type, but the sub-typing seemed a lot more interesting and general purpose that the specific solution to the original problem)</p> mintywalker 2009-07-19T16:00:42+00:00 journal Upgrading debian packages with newer cpan releases <p>I do all my cpan package/module management via debian's apt(itude) tool.</p><p>It works really well (for me) with one fairly major exception. Figuring out how to build packages/deb files is a bit complex.</p><p>It seems to be one of those problems that has so many different ways to do it and/or so many pitfalls that newbie dummies like me struggle. However once over that hurdle I have found using apt to be really nice.</p><p>After a lot of help from <a href="">Aaron</a> and faaar too many hours pulling out my hair I believe I have a process that generally works for me. So I thought I would share a worked example.</p><p> <b> <a href="">Upgrading libwww-perl via a Debian / Ubuntu deb package</a> </b> </p><p>It is hopefully a cleaner and tidier example of a <a href="">post to</a> about the same thing.</p><p>If anyone has any experience with building Debian/Ubuntu packages from cpan, I'd welcome some feedback.</p><p>ps. I'm aware of <a href=""></a> but it doesn't always have what I want. I also find that the differently named packages sooner or later cause some kinda clash with the packages I get from Debian/Ubuntu.</p><p>pps. I'm also aware of <a href="">dh-make-perl</a> however that has caused me to trip up previously with version numbers.</p><p>For example the version of Spreadsheet::ParseExcel <a href="">in Ubuntu Jaunty is 0.3300</a>. The <a href="">latest version on cpan</a> is 0.49 and to make that work it's version in the debian package needs to be 0.4900. But dh-make-perl picks 0.49.</p><p>Plus, sometimes you want to tinker with the debian control files a little, and I've not yet figured out how to have it upgrade an existing module rather than build a new version (and loose all the changelog history from the debian package).</p><p>Again, via Aaron, I found the following to be rather helpful when figuring out what the version number wants to be for Debian</p><p> <code>dpkg --compare-versions 0.3300 lt 0.4900 &amp;&amp; echo yes || echo no</code> </p><p>ppps. If you're more a redhat / fedora kinda person then perhaps <a href="">this might be of interest</a></p> mintywalker 2009-07-11T15:23:15+00:00 journal