tag:blogger.com,1999:blog-61629108772680670022024-03-19T05:12:29.612+01:00Jerome QuelinJérôme Quelinhttp://www.blogger.com/profile/18298636285366492379noreply@blogger.comBlogger142125tag:blogger.com,1999:blog-6162910877268067002.post-43808888898366335852012-09-25T15:53:00.000+02:002012-09-25T18:08:24.054+02:00cpan2pkg now available in text mode!<a href="https://metacpan.org/module/cpan2pkg">cpan2pkg</a> is the tool used to automatically package a module from <a href="http://metacpan.org/">cpan</a> to <a href="http://mageia.org/">mageia</a> as a rpm, along with all its dependencies. it's built on shoulders of giants (<a href="https://metacpan.org/module/cpan2dist">cpan2dist</a>, mgarepo, <a href="https://metacpan.org/dist/POE">poe</a>, etc)<br />
<br />
it used to feature a <a href="https://metacpan.org/dist/Tk">tk</a> window with one tab per module being investigated - but this was troublesome for people wanting to have a cli. so i just released a new version of cpan2pkg which brings a --text flag (or -T for the lazy ones) which works on the tty. of course, we loose the ability to interact with the application, but that's still convenient sometimes. and of course, the tk version is still available!Jérôme Quelinhttp://www.blogger.com/profile/18298636285366492379noreply@blogger.com0tag:blogger.com,1999:blog-6162910877268067002.post-10139121940051765472012-07-12T15:13:00.001+02:002012-07-12T15:13:04.473+02:00more than 3000 perl packages in mageia!long time no post... but now that <a href="http://perl.mageia.org/stats">mageia perl stats</a> are up & running (daily update), i can as well present the site and brag about the new record we achieved: <a href="http://mageia.org/">mageia</a> is now shipping with more than 3000 perl packages, for a total of 26500+ real perl modules. not that bad, uh? :-)Jérôme Quelinhttp://www.blogger.com/profile/18298636285366492379noreply@blogger.com0tag:blogger.com,1999:blog-6162910877268067002.post-85288560421475565432011-11-24T15:17:00.001+01:002011-11-24T18:21:22.807+01:00audio::mpd gained ipv6 supportwhen i got a bug report asking for ipv6 support in <a href="http://metacpan.org/module/Audio::MPD">audio::mpd</a>, i didn't know where to start, and put it aside... but since i fixed quite a few test bugs in audio-mpd, i thought i could give a try at supporting ipv6.<br />
<br />
and it proved quite easy in fact, with <a href="http://metacpan.org/module/IO::Socket::IP">io::socket::ip</a> which is a drop-in replacement for io::socket::inet... and thus, by changing 3 strings in audio-mpd, it is now ipv6 enabled - neat!<br />
<br />
so, enable ipv6 on your software with the following one-liner:<br />
<blockquote>
<pre>$ ack -l 'IO::Socket::INET' | xargs perl -pi -E 's/IO::Socket::INET/IO::Socket::IP/g'</pre>
</blockquote>
easy, uh? who said ipv6 was difficult? :-)Jérôme Quelinhttp://www.blogger.com/profile/18298636285366492379noreply@blogger.com2tag:blogger.com,1999:blog-6162910877268067002.post-44065814547900721092011-09-16T18:04:00.001+02:002011-09-16T18:04:35.371+02:00prisk gains its own map format, allowing translations!till now, <a href="https://metacpan.org/release/Games-Risk">games::risk</a> was using map files from <a href="http://domination.sourceforge.net/">jrisk</a>. this allowed me to concentrate on the gui and the game experience without having to tackle everything at once.<br />
<br />
being a simple format, it was somehow easy to read the maps... but its simplicity has some drawbacks, and for example it's not possible to translate them. therefore, i finally bit the bullet and implemented a format for prisk. basically, information remains the same (such as the mechanism to determine the current country), with one exception: maps are implemented as perl modules. and this allows the use of gettext and other i18n schemes.<br />
<br />
this means that maps are now translatable! french translation is of course provided, but <a href="https://github.com/jquelin/games-risk/tree/master/share/locale">help is needed for other languages</a>... (hint, hint)<br />
<br />
of course, i wrote an importer to migrate jrisk maps to new prisk format. i also intend to take this opportunity to create some new perl dists with <a href="http://domination.sourceforge.net/getmaps.shtml">extra maps</a>.<br />
<br />
this prisk release shows also a lot of cleanup in the internals, with a partial migration to <a href="http://metacpan.org/module/Moose">moose</a> and <a href="http://metacpan.org/module/MooseX::POE">moosex::poe</a>. using <a href="https://metacpan.org/module/Moose::Manual::Attributes#Weak-references">weak_ref</a> for scalar attributes and a tied <a href="http://metacpan.org/module/Hash::NoRef">hash::noref</a> to cache objects allowed to use circular references without having to deal with their problems. finally, prisk is now deferring some module loading to runtime, leading to a faster startup. the changes are plenty, so now is a good time to <a href="http://metacpan.org/release/Games-Risk">give it a try!</a> (after v3.112590 has hit your nearest mirror of course)<br />
<br />
future releases will continue to see code cleanups and migration to moose. prisk also finally has a configuration system to save user preferences - i "just" need to use this system throughout the code. some dialogs needs also to migrate to prisk's look&feel (thanks <a href="http://metacpan.org/module/Tk::Role::Dialog">tk::role::dialog</a>), and i have some ideas to improve the artificial intelligences & better use <a href="http://metacpan.org/module/POE">poe</a>. not counting other game modes to take into account... oh well, let's say that prisk will keep me busy quite some time! :-)Jérôme Quelinhttp://www.blogger.com/profile/18298636285366492379noreply@blogger.com0tag:blogger.com,1999:blog-6162910877268067002.post-23141575850584972292011-08-29T14:05:00.000+02:002011-08-29T14:05:19.869+02:00the great renaming: Dist::Zilla::Plugin::CriticTestsoops! <a href="http://jquelin.blogspot.com/2011/08/great-renaming-distzillaplugincompilete.html">kentnl did it again</a>. :-)<br />
<br />
this time, dist::zilla::plugin::critictests has been renamed to dist::zilla::plugin::test::perl::critic. once again, change will be trivial for authors [0]. previous module will continue working, for at least one year counting from today.<br />
<br />
github repository has also changed and is available here: <a href="https://github.com/jquelin/dist-zilla-plugin-test-perl-critic">https://github.com/jquelin/dist-zilla-plugin-test-perl-critic</a><br />
<br />
[0] and this time, i did not fubar-ed the code! :-|Jérôme Quelinhttp://www.blogger.com/profile/18298636285366492379noreply@blogger.com0tag:blogger.com,1999:blog-6162910877268067002.post-69118977589140290222011-08-27T12:07:00.001+02:002011-08-27T13:51:52.890+02:00the great renaming: Dist::Zilla::Plugin::CompileTestsin a move to rationalize the plugin namespace of <a href="http://search.cpan.org/dist/Dist-Zilla/">dist::zilla</a>, <a href="https://github.com/kentfredric">kentnl</a> started a great renaming: <a href="http://search.cpan.org/perldoc?Dist::Zilla::Plugin::CompileTests">dzp:compiletests</a> has been renamed to <a href="http://search.cpan.org/perldoc?Dist::Zilla::Plugin::Test::Compile">dzp:test::compile</a><br />
<br />
previous module is deprecated, and may be removed later on (but not before one year, that is 2012-08-27). in the meantime, it will continue working (although with a warning).<br />
<br />
what does it mean for dzil users? well, nothing much, since old module will continue working as is. however, they should better migrate their dist.ini from:<br />
<blockquote><pre>[CompileTests]</pre></blockquote>to:<br />
<blockquote><pre>[Test::Compile]</pre></blockquote><br />
nothing else is needed... for now, since i guess kentnl will continue proposing patches / pullreqs to dzil:*tests plugin authors! ;-)<br />
<br />
also, please note that the github repository has been renamed and is now available at <a href="https://github.com/jquelin/dist-zilla-plugin-test-compile">a different url</a>. ditto for <a href="http://search.cpan.org/">cpan</a>, since the dist is now named <a href="http://search.cpan.org/dist/Dist-Zilla-Plugin-Test-Compile/">dist-zilla-plugin-test-compile</a>.Jérôme Quelinhttp://www.blogger.com/profile/18298636285366492379noreply@blogger.com2tag:blogger.com,1999:blog-6162910877268067002.post-47283991938132211812011-06-27T15:01:00.000+02:002011-06-27T15:01:35.966+02:00cpan2pkg: prettier gui, ready for mageia!remember <a href="http://jquelin.blogspot.com/search/label/cpan2pkg">cpan2pkg</a>? this is the tool built around <a href="http://search.cpan.org/dist/CPANPLUS/">cpan2dist</a> to create a native linux package, taking dependencies into account, and integrated with linux distribution repository + buildsystem.<br />
<br />
it used to be <a href="http://www.mandriva.com/">mandriva</a> only, and curses-based. now that <a href="http://www.mageia.org/">mageia</a> is in full swing mode, i had to port cpan2pkg to support it. and it was a perfect opportunity to clean up the module, and prettify the interface.<br />
<br />
here's the result:<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4pEL5krrkc_uT25_FsRNb1djNXtZJyJKDW4vloMNUqjuuTr2DXRYCeYjMnYvOcs1XkPXfAZ3kJAMN7F-KbJeqSbILSXbMZn9Op2BXLAcRVDAxmzYCgiT54IHhnVe9RTFxQ7djjAu-Vp0w/s1600/cpan2pkg-tk" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="197" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4pEL5krrkc_uT25_FsRNb1djNXtZJyJKDW4vloMNUqjuuTr2DXRYCeYjMnYvOcs1XkPXfAZ3kJAMN7F-KbJeqSbILSXbMZn9Op2BXLAcRVDAxmzYCgiT54IHhnVe9RTFxQ7djjAu-Vp0w/s320/cpan2pkg-tk" width="320" /></a></div><br />
on the left, you can see the modules currently being processed, with their status both locally and on the build-system. green means available, and here you can see that moosex::alwayscoerece is being built locally (orange) and is not yet available on mageia (yellow).<br />
<br />
note that mageia is fully supported: cpan2pkg will poll the <a href="http://pkgsubmit.mageia.org/">buildsystem status page</a> to follow a module build, and make sure a module is ready before submitting those depending on it.<br />
<br />
it is still using <a href="http://search.cpan.org/dist/POE/">poe</a> underneath, but this time with <a href="http://search.cpan.org/dist/Tk/">tk</a>. adding support for a platform can be done quite easily - <a href="https://github.com/jquelin/app-cpan2pkg">patches welcome</a>!Jérôme Quelinhttp://www.blogger.com/profile/18298636285366492379noreply@blogger.com1tag:blogger.com,1999:blog-6162910877268067002.post-23726413745881703862011-06-21T17:22:00.000+02:002011-06-21T17:22:09.548+02:00"magpie fix" also tigthens spec filesfollowing <a href="http://jquelin.blogspot.com/2011/06/more-tightened-spec-file-produced-by.html">cpanplus backend</a> cleaning, "magpie fixspec" also gained the ability to clean up spec files with trivial %clean section and %defattr definition.<br />
<br />
this means that updating a perl package on mageia (with either "magpie up" or "magpie dwim") will also trim the rpm spec file accordingly. neat!Jérôme Quelinhttp://www.blogger.com/profile/18298636285366492379noreply@blogger.com0tag:blogger.com,1999:blog-6162910877268067002.post-82740657916208067582011-06-21T16:35:00.000+02:002011-06-21T17:21:42.251+02:00more tightened spec file produced by mageia cpanplus backend<a href="http://www.blogger.com/"><span id="goog_221479457"></span>cpanplus::dist::mageia<span id="goog_221479458"></span></a> 1.111720 has just been released, with 2 changes:<br />
<ul><li>no more %defattr definition</li>
<li>no more default %clean section</li>
</ul>indeed, rpm will handle those automatically, as dexter mentioned (cf <a href="https://www.mageia.org/pipermail/mageia-dev/2011-June/005878.html">here</a> and <a href="https://www.mageia.org/pipermail/mageia-dev/2011-June/005471.html">here</a>). this way, we'll have spec files a bit more tightened, which is always better from a maintainer pov.Jérôme Quelinhttp://www.blogger.com/profile/18298636285366492379noreply@blogger.com0tag:blogger.com,1999:blog-6162910877268067002.post-14477122462101330702011-04-15T10:20:00.000+02:002011-04-15T10:20:48.078+02:00keep track of your tk widgets easilywhen writing a tk application, it's almost always a good idea to keep track of your widgets: this allows to change their state later on.<br />
<br />
most of the time, a simple hash is enough; but it is usually wrapped up in methods to make the hash private to the window object. and of course, those methods are duplicated in all modules, under a form or another...<br />
<br />
since duplication is bad, i just released <a href="http://search.cpan.org/dist/Tk-Role-HasWidgets">Tk::Role::HasWidgets</a> which is a <a href="http://search.cpan.org/perldoc?Moose">moose</a> role, and provides with a convenient way to store & retrieve your widgets:<br />
<blockquote><pre>use Moose;
with 'Tk::Role::HasWidgets';
# when creating a widget
$self->_set_w( 'my_button', $button );
# later on, in one of the methods
$self->_w( 'my_button' )->configure( ... );
</pre></blockquote><br />
the methods featured in this role begin with "_", that is, they are following perl convention of private methods. this is on purpose: remember that this module is a role, consumed by your class. and you don't want those methods to be available outside of the window class, do you?Jérôme Quelinhttp://www.blogger.com/profile/18298636285366492379noreply@blogger.com0tag:blogger.com,1999:blog-6162910877268067002.post-46568142293819637282011-04-12T14:48:00.000+02:002011-04-12T14:48:05.744+02:00a bit of dwimery in magpieall the pieces were available, binding them together was just a smop. therefore <a href="http://search.cpan.org/dist/App-Magpie">magpie</a> just got a new subcommand: "magpie dwim" which does exactly what i mean...<br />
<br />
in the case of magpie, what i mean is of course:<br />
<ul><li>check which perl packages are not up to date wrt <a href="http://search.cpan.org/">cpan</a></li>
<li>check them out</li>
<li>tighten spec file </li>
<li>update the package to latest version</li>
<li>commit result</li>
<li>wait for <a href="http://pkgsubmit.mageia.org/">build system</a> if needed</li>
<li>submit result</li>
</ul>and all of this is done <a href="http://search.cpan.org/dist/Proc-ParallelLoop">in parallel</a>, with errors reported at the end.<br />
you too can have some fun:<br />
<blockquote><pre>$ sudo urpmi magpie
$ magpie dwim
</pre></blockquote><br />
maintaining the ~2500 perl module rpm packages in <a href="http://mageia.org/">mageia</a> has never been so easy!Jérôme Quelinhttp://www.blogger.com/profile/18298636285366492379noreply@blogger.com0tag:blogger.com,1999:blog-6162910877268067002.post-79145978719918908852011-03-09T13:17:00.000+01:002011-03-09T13:17:56.037+01:00magpie: how to list non up-to-date perl modulesthe final stone is now built for <a href="http://search.cpan.org/dist/App-Magpie">magpie</a>: it's possible to list on your <a href="http://mageia.org/">mageia</a> system the perl modules that have up to date versions upstream. it allows to see at a glance which perl packages need to be updated. it's based on <a href="http://search.cpan.org/dist/CPANPLUS">cpanplus</a>, and only tackles perl modules installed on your system.<br />
<br />
the new command is:<br />
<blockquote><pre>$ magpie old
** core packages: 11
Devel::DProf 20080331.00 20110228.00
Devel::SelfStubber 1.03 1.05
[...]
if 0.05 0.0601
** normal packages: 57
DateTime::TimeZone 1.28 1.29 perl-DateTime-TimeZone 1.280.0
Digest::SHA 5.50 5.60 perl-Digest-SHA 5.500.0
[...]
parent 0.224 0.225 perl-parent 0.224.0
** orphan packages: 7
KENTNL 0.010173Dist::Zilla…
[...]
inc::latest 0.3624 0.38
** strange packages: 3
App::cpanminus 1.2001 1.4002 cpanminus(1.200.100),perl-App-cpanminus(1.200.100)
HTTP::Response 6.00 6.01 perl-libwww-perl(5.837.0),perl-Test-Mock-LWP(0.50.0),perl-HTTP-Message(6.0.0)
Perl::MinimumVersion 1.27 1.28 perl-Perl-MinimumVersion(1.270.0),perl-Perl-Critic-Pulp(47.0.0)
** ignored modules: 12
Boulder::Unigene(28051999.00), File::MimeInfo::Rox(0.20), Getopt::Lucid(0.19), HTML::Table(2.08), Imager::Font::Type1(1.011), Inline::Python(0.38), Lingua::Features(0.30), Parse::RecDescent::FAQ::Original(6.00), Switch(2.16), Tie::Watch(1.301), WebFetch(0.13), XML::Grove(0.46)
</pre></blockquote>the columns are: module, old version, new version, mageia package name, mageia package version.<br />
<br />
as you can see, the modules are sorted in various categories:<br />
<ul><li>core - modules shipped with perl (or perl-base)</li>
<li>dual-lifed (not shown above) - modules that are both shipped with perl (or perl-base) and as a stand-alone package</li>
<li>normal - regular modules with their own package</li>
<li>orphan - modules that do not belong to a mageia package (either inherited from mandriva, or not yet pushed on buildsystem).</li>
<li>strange - modules that belong to more than one magiea package</li>
<li>ignore - those are modules that either cannot be built (with an upstream bug) or that confuse cpanplus when comparing versions </li>
</ul>with this information, it's therefore very straightforward to <a href="http://jquelin.blogspot.com/2011/02/new-magpie-command-update.html">update the packages</a>, launching the following command as needed:<br />
<blockquote><pre>$ eval $( magpie co -s $pkg ) && magpie update</pre></blockquote>of course, since all the building blocks are now available, that's what the last command to be implemented (magpie dwim) will do!Jérôme Quelinhttp://www.blogger.com/profile/18298636285366492379noreply@blogger.com0tag:blogger.com,1999:blog-6162910877268067002.post-11205083525981840862011-02-28T12:44:00.001+01:002011-03-01T12:26:32.765+01:00svk cannot be built anymore - EDIT: svk will build with reduced featureswhile rebuilding perl packages for <a href="http://mageia.org/">mageia</a>, i found out that <a href="http://search.cpan.org/dist/SVN-Mirror">svn::mirror</a> cannot be built anymore with <a href="http://subversion.tigris.org/">subversion</a> 1.6.x. said like this, one may think "wtf, i don't give a damn to svn::mirror". and lots of other cpan modules are bit-rotting, so what's the point? well, the thing is, svn::mirror is a prereq for <a href="http://svk.bestpractical.com/">svk</a>, the decentralized subversion...<br />
<br />
granted, <a href="http://blog.bestpractical.com/2009/05/the-future-of-svk.html">svk has been end-of-lifed in 2009</a>, yet it's still widely in use. but as long as <a href="https://rt.cpan.org/Ticket/Display.html?id=51088">svn-mirror won't get fixed</a>, mageia won't include svk support.<br />
<br />
EDIT (20110301): in fact, svn::mirror is an optional prereq for svk - mageia will therefore ship with svk, albeit with a reduced feature setJérôme Quelinhttp://www.blogger.com/profile/18298636285366492379noreply@blogger.com2tag:blogger.com,1999:blog-6162910877268067002.post-55449831697515779572011-02-25T16:02:00.000+01:002011-02-25T16:02:54.892+01:00magpie update now waaaaaaay faster!"<a href="http://search.cpan.org/dist/App-Magpie">magpie</a> update", used to update automatically a perl module rpm to its latest version, was a bit slow. the culprit was parse::cpan::packages, taking a whole 10 seconds to parse 02packages.details.txt.gz<br />
<br />
fortunately, i found <a href="http://search.cpan.org/perldoc?Parse::CPAN::Packages::Fast">parse::cpan::packages::fast</a> (from <a href="http://search.cpan.org/%7Esrezic/">slaven</a>++), which does exactly the same job in less than a second...<br />
<br />
so, with <a href="https://github.com/jquelin/app-magpie/commit/922f539993c92c78e2d0d00af373d83cdb9a26a6">a 16-line patch</a> (-2/+2), magpie update now is almost instant. cpan is definitely the home of nice gems, and *the* advantage of perl.Jérôme Quelinhttp://www.blogger.com/profile/18298636285366492379noreply@blogger.com0tag:blogger.com,1999:blog-6162910877268067002.post-79622829992400883272011-02-10T14:46:00.000+01:002011-02-10T14:46:37.427+01:00new magpie command: updatei'm happy to report yet another <a href="http://search.cpan.org/dist/App-Magpie">magpie</a> release, version 1.110410<br />
<br />
this release brings a new subcommand: update (aka refresh)<br />
<br />
it will automatically update a perl module package being checked out to the latest version, update buildrequires (with <a href="http://jquelin.blogspot.com/2011/02/new-magpie-command-fixspec.html">fixspec</a>), try to build it locally, commit if successful, wait according to build-system hints, then submit it. <br />
<br />
it's easy to use:<br />
<blockquote>$ eval $( magpie co -s perl-Foo-Bar )<br />
$ magpie update -v</blockquote><br />
note: it requires a <a href="http://search.cpan.org/perldoc?minicpan">minicpan</a> installation on your computer...<br />
<br />
now, you too can join the fun of updating perl modules packages for <a href="http://mageia.org/">mageia</a>! but it's not yet over, automation will go one step further - stay tuned...Jérôme Quelinhttp://www.blogger.com/profile/18298636285366492379noreply@blogger.com0tag:blogger.com,1999:blog-6162910877268067002.post-4984750921159402992011-02-08T16:04:00.000+01:002011-02-08T16:04:37.843+01:00new magpie command: fixspeci just released <a href="http://search.cpan.org/dist/App-Magpie">magpie</a> 1.110390, which brings a new subcommand: <a href="http://search.cpan.org/perldoc?App::Magpie::App::Command::fixspec">magpie fixspec</a><br />
<br />
as you can guess, this command will try to sanitize a rpm spec file a bit. to use it, you must be in a package checkout, and run it without any argument.<br />
<blockquote>$ eval $( magpie co perl-Foo-Bar )<br />
$ magpie fixspec -v<br />
<br />
# to see the list of options<br />
$ magpie help fix </blockquote><br />
among the things that fixspec does:<br />
<ul><li>it updates %doc depending on the existing files, including meta files</li>
<li>it splits multiple bundled build-/requires to have only one per line</li>
<li>it lines up vertically the summary / etc </li>
<li>it extracts perl buildrequires from meta.json/meta.yml if present</li>
<li>it removes buildroot definition</li>
<li>it removes mdv macros</li>
</ul>note that the code is not really clean, it might gain from being in its <br />
own module, with real rpm parsing instead of big regexes. also, it<br />
assumes that we're cleaning a perl module spec file, so you're on your<br />
own if you're using it on other spec file: it might remove the whole<br />
svn, eat your babies, or even convert your rpm database to rpm5. you've<br />
been warned. :-)Jérôme Quelinhttp://www.blogger.com/profile/18298636285366492379noreply@blogger.com2tag:blogger.com,1999:blog-6162910877268067002.post-20607655122627214142011-02-03T11:26:00.000+01:002011-02-03T11:26:44.543+01:00new dist::zilla command: poti just released <a href="http://search.cpan.org/dist/Dist-Zilla-App-Command-pot">dist::zilla::app::command::pot</a>, providing <a href="http://search.cpan.org/dist/Dist-Zilla">dist::zilla</a> with a new <i>pot</i> command (not the plant, you hippy!).<br />
<br />
this command allows to (re-)generate a messages.pot file holding all strings to be translated from your module. If a messages.pot file is found, it will update it. otherwise, you will be prompted for a file location, with a default matching<a href="http://search.cpan.org/dist/libintl-perl"> Locale::TextDomain</a> settings:<br />
<blockquote style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;">$dzil pot</span><br />
<span style="font-size: x-small;">[...]</span><br />
<span style="font-size: x-small;">[DZ] Trying to find a messages.pot file...<br />
[DZ] No messages.pot found - enter your own.<br />
messages.pot to use [lib/LocaleData/Foo-Bar-messages.pot]:<br />
[DZ] Running xgettext...</span></blockquote>yup, underneath it just runs xgettext. and currently, it only finds calls to <span style="font-size: x-small;"><i style="font-family: "Courier New",Courier,monospace;">T()</i></span> - but i'll add an option to provide your own convention such as <span style="font-family: "Courier New",Courier,monospace; font-size: x-small;"><i>_()</i></span>, <span style="font-family: "Courier New",Courier,monospace; font-size: x-small;"><i>gettext()</i></span>, etc.Jérôme Quelinhttp://www.blogger.com/profile/18298636285366492379noreply@blogger.com2tag:blogger.com,1999:blog-6162910877268067002.post-8136075116950040632011-02-01T12:17:00.000+01:002011-02-01T12:17:58.003+01:00magpie - MAGeia Perl Integration Easyin my mandriva to <a href="http://mageia.org/">mageia</a> switch, i promised to myself that i'd collect the various scripts that i'm using on a day to day basis to maintain the myriad of perl rpm packages.<br />
<br />
therefore, i've created <a href="http://search.cpan.org/dist/App-Magpie">magpie</a> (MAGeia Perl Integration Easy) and uploaded it to cpan. the tool is not yet complete, but i'm incorporating new commands now and then.<br />
<br />
it currently supports 2 commands:<br />
<ul><li><span style="font-family: "Courier New",Courier,monospace;">magpie bswait</span> - this command pauses according to the recommendation of <a href="http://pkgsubmit.mageia.org/">mageia build-system</a>. it indeed provides some recommendation on how much time to pause between 2 packages submission to not overload it - (this is known as throttling).</li>
<li><span style="font-family: "Courier New",Courier,monospace;">magpie co</span> - this brand new command (in version 1.110320) allows to check-out a given package from mageia repository.</li>
</ul><br />
some details about magpie checkout: it is <b>not</b> meant to replace "<span style="font-family: "Courier New",Courier,monospace;">mgarepo co</span>", it does in fact use mgarepo underneath. so what does this command add?<br />
<ul><li>the possibility to check out in a given directory<br />
<blockquote>$ magpie co -d ~/rpm/cauldron perl</blockquote></li>
<li>the fact that it will either check out *or* update the local check-out if it already exists:<br />
<blockquote>$ magpie co -d ~/rpm/cauldron perl<br />
# check-out if 1st run, update otherwise</blockquote></li>
<li>finally, the possibility to dump a shell command to execute to change directory in the fresh check-out:<br />
<blockquote># add this in your ~/.bashrc<br />
function cco() { eval $(magpie co -d ~/rpm/cauldron -q -s $*); }<br />
# then, one can do a fresh checkout/update + cd by issuing:<br />
$ cco perl</blockquote></li>
</ul><br />
nothing revolutionary, but it saves some keystrokes here and there.Jérôme Quelinhttp://www.blogger.com/profile/18298636285366492379noreply@blogger.com2tag:blogger.com,1999:blog-6162910877268067002.post-33512995415583957752011-01-25T11:44:00.000+01:002011-01-25T11:44:13.487+01:00mageia warming up - rebuilding perl packagesit's been a long time without posting - but real life kicked in.<br />
<br />
one of the things that keep me busy those days is the rebuilding of perl packages for <a href="http://mageia.org/">mageia</a>. around 2000 have been done, with ~400 still waiting. it's been a good opportunity to clean up the mess: remove old packages, clean spec files, etc.<br />
<br />
all in all, mageia will be quite in a good shape regarding perl packages when mirroring will start - which should happen quite soon!Jérôme Quelinhttp://www.blogger.com/profile/18298636285366492379noreply@blogger.com0tag:blogger.com,1999:blog-6162910877268067002.post-64918905184875686132010-09-18T18:07:00.002+02:002010-09-18T18:16:12.336+02:00good-bye mandriva, hello mageia!word <a href="http://digg.com/news/technology/developers_fork_mandriva_linux_creating_mageia">is</a> <a href="http://www.reddit.com/r/linux/comments/dfnsc/developers_fork_mandriva_linux_creating_mageia/">spreading</a> <a href="http://linux.slashdot.org/story/10/09/18/1437248/Developers-Fork-Mandriva-Linux-Creating-Mageia">fast</a>: mandriva developers & contributors are forking mandriva. the new distribution is named <a href="http://mageia.org/">mageia</a> - read the full announce on <a href="http://mageia.org/">http://mageia.org</a>. my name being on the announce, no need to say that i fully support this move... :-) more news will be available in the coming days.Jérôme Quelinhttp://www.blogger.com/profile/18298636285366492379noreply@blogger.com0tag:blogger.com,1999:blog-6162910877268067002.post-21779431875363888422010-08-13T19:12:00.001+02:002010-08-13T19:13:20.097+02:00supply your own perlcriticrc to dzil test pluginif you wanted the ability to supply your own <a href="http://search.cpan.org/perldoc?Perl::Critic">perlcriticrc</a> while using <a href="http://search.cpan.org/dist/Dist-Zilla-Plugin-CriticTests">dist-zilla-plugin-critictests</a>, then <a href="http://github.com/Hercynium">stephen scaffidi</a> is your hero of the day. indeed, he just implemented this - and i had to do the tedious work of typing "<span style="font-family: "Courier New",Courier,monospace;">dzil release</span>". oh well, i can say that life is difficult. :-)Jérôme Quelinhttp://www.blogger.com/profile/18298636285366492379noreply@blogger.com0tag:blogger.com,1999:blog-6162910877268067002.post-69252043225977182472010-07-29T10:28:00.000+02:002010-07-29T10:28:26.767+02:00perl's state in mandriva cookersome time after <a href="http://www.mandriva.com/">mandriva</a> 2010.1 has been released, i'm now pleased to report that <a href="http://www.perl.org/">perl</a> has been updated to 5.12.1, all <a href="http://search.cpan.org/">cpan</a> modules are up-to-date (including padre 0.68) or bugs have been reported upstream... and parrot 2.6.0 is currently building.<br />
<br />
the perl 5.12.0 - 5.12.1 upgrade was really smooth: no patch to rediff, reapply, etc. that's definitely a good thing for perl maintainers to have a stable series with only critical fixes going in. i've already <a href="http://perldoc.perl.org/5.12.1/perlthanks.html">said it</a>, but thanks again to p5p!Jérôme Quelinhttp://www.blogger.com/profile/18298636285366492379noreply@blogger.com1tag:blogger.com,1999:blog-6162910877268067002.post-15414254403151786072010-06-16T13:56:00.000+02:002010-06-16T13:56:18.895+02:00announcing file::sharedir::pathclassfollowing <a href="http://jquelin.blogspot.com/2010/06/random-file-homedir-bits.html">last week's announce</a> of <a href="http://search.cpan.org/perldoc?File::HomeDir::PathClass">file::homedir::pathclas</a>, i also committed <a href="http://search.cpan.org/perldoc?File::ShareDir::PathClass">file::sharedir::pathclass</a> on the same principle. therefore, if you always wrap <a href="http://search.cpan.org/perldoc?File::ShareDir">file::sharedir</a> results in <a href="http://search.cpan.org/perldoc?Path::Class">path::class</a> objects for greater convenience, just use <a href="http://search.cpan.org/perldoc?File::ShareDir::PathClass">file::sharedir::pathclass</a> instead, which is doing that automatically for you.Jérôme Quelinhttp://www.blogger.com/profile/18298636285366492379noreply@blogger.com0tag:blogger.com,1999:blog-6162910877268067002.post-26495660746946342922010-06-11T12:44:00.000+02:002010-06-11T12:44:39.408+02:00random file-homedir bitsno need to present <a href="http://search.cpan.org/perldoc?File::HomeDir">file::homedir</a>, the module to use to retrieve various information such as where is my home, where is my desktop, where are my documents, etc.<br />
<br />
since my needs were not all covered, i contacted <a href="http://use.perl.org/%7Ealias/journal">alias</a> with some of my ideas. he kindly gave me a commit bit so i can scratch my itches at will...<br />
<br />
i therefore implemented xdg support for recent unix desktops, with <a href="http://search.cpan.org/%7Edaxim/">daxim</a>'s help. this means that unix platforms with gnome, kde or any recent desktops won't report <span style="font-family: "Courier New",Courier,monospace;">$HOME</span> as the one and unique answer to all those questions. this feature is available in released file-homedir 0.91 - towards a cleaning of our homedirs, yay!<br />
<br />
still in the work (not yet released), i've also checked in a <i style="font-family: "Courier New",Courier,monospace;">my_dist_data($dist)</i> function, to standardize the directory where the application will store its internal data, such as database or cache. it is located in:<br />
<blockquote><span style="font-family: "Courier New",Courier,monospace;">my_data()/Perl/dist/$dist</span></blockquote>following the now traditional <i>data/vendor/application</i> scheme (on legacy unix desktops, the directory will be <span style="font-family: "Courier New",Courier,monospace;">$HOME/.perl/dist/$dist</span><span style="font-family: "Courier New",Courier,monospace;">/var</span>, to be sure that it's a hidden directory). to be consistent with <a href="http://search.cpan.org/perldoc?File::ShareDir">file::sharedir</a>, i guess i'll also implement <i><span style="font-family: "Courier New",Courier,monospace;">my_module_data($module)</span></i>, following the same reasoning.<br />
<br />
this will likely be released in version 0.92, before working on the last remaining bit on my plate: <i><span style="font-family: "Courier New",Courier,monospace;">my_dist_config($dist)</span></i>, returning a directory where an application will be able to store its configuration. it's a bit different of the data directory (even if config <i>is</i> some kind of data): data is supposed to be transient, or can be removed without harming the app - while the config should not be erased. however, it's not really as straightforward as the data directory, since not all platforms support this: on windows, users are not supposed to update config by hand, so it's often stored in the registry... so how to preserve the cross-distribution nature of file-homedir for this very feature? this will require some thinking...<br />
<br />
finally, it's with great pleasure that i'm announcing <a href="http://search.cpan.org/perldoc?File::HomeDir::PathClass">file-homedir-pathclass</a>, which is a convenient wrapper around file-homedir returning <a href="http://search.cpan.org/perldoc?Path::Class">path::class</a> objects. alias did not want to introduce it in file-homedir to preserve compatibility, and suggested to release it as a new dist... so i released this new module, allowing to write for example:<br />
<blockquote><div style="font-family: "Courier New",Courier,monospace;">perl -MFile::HomeDir::PathClass=-all -E 'say $_ for my_home()->children'</div></blockquote>Jérôme Quelinhttp://www.blogger.com/profile/18298636285366492379noreply@blogger.com0tag:blogger.com,1999:blog-6162910877268067002.post-32727404597846209492010-06-08T10:53:00.005+02:002010-06-08T11:10:15.084+02:00how to retrieve image size in perltoday's topic is quite easy: retrieving image size (in perl, with the help of <a href="http://search.cpan.org/">cpan</a> of course). indeed, when one wants to <a href="http://jquelin.blogspot.com/2009/05/image-resizing-in-perl.html">resize an image</a>, it's often interesting to know its current size.<br /><br />the easiest way to retrieve those information is of course to use <a href="http://search.cpan.org/perldoc?Image::Size">image::size</a>:<br /><script src="http://gist.github.com/429784.js"></script><br />easy, wasn't it?<br /><br />however, as mentioned previously, retrieving those information is often just the prelude before doing some transformation to the image itself. and image::size, while doing it perfectly, does only one thing - it cannot be used for any other image manipulation. so if you intend to use another module after, you can as well use this other module to retrieve this information: that'll be faster (image read only once) and use less memory (only one module loaded). here's how to get those information with <a href="http://search.cpan.org/perldoc?Image::Magick">image::magick</a>:<br /><script src="http://gist.github.com/429787.js"></script><br />it wasn't that difficult, and opens the whole <a href="http://www.imagemagick.org/">image magick</a> world to your program!Jérôme Quelinhttp://www.blogger.com/profile/18298636285366492379noreply@blogger.com7