mintywalker's Journal http://use.perl.org/~mintywalker/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 pudge@perl.org Technology hourly 1 1970-01-01T00:00+00:00 mintywalker's Journal http://use.perl.org/images/topics/useperl.gif http://use.perl.org/~mintywalker/journal/ Moose sub types : one module or another http://use.perl.org/~mintywalker/journal/39312?from=rss <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 irc.perl.org I thought I'd write up my findings<nobr> <wbr></nobr>...</p><p> <a href="http://sysmonblog.co.uk/2009/07/how-to-create-your-own-moose-sub-types-in-perl.html">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 http://use.perl.org/~mintywalker/journal/39269?from=rss <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="http://aaroncrane.co.uk/">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="http://sysmonblog.co.uk/2009/07/upgrading-libwww-perl-via-a-debian-ubuntu-deb-package.html">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="http://london.pm.org/pipermail/london.pm/Week-of-Mon-20090518/017177.html">post to london.pm</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="http://debian.pkgs.cpan.org/">http://debian.pkgs.cpan.org/</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="http://michael.thegrebs.com/2008/07/02/dh-make-perl-will-rock-your-socks/">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="http://packages.ubuntu.com/jaunty/libspreadsheet-parseexcel-perl">in Ubuntu Jaunty is 0.3300</a>. The <a href="http://search.cpan.org/dist/Spreadsheet-ParseExcel/">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="http://rpm.mag-sol.com/">this might be of interest</a></p> mintywalker 2009-07-11T15:23:15+00:00 journal