[Catalyst] Patch for Catalyst-Action-REST-0.63 distro

Matt S Trout dbix-class at trout.me.uk
Thu Aug 14 15:48:21 BST 2008


On Wed, Aug 13, 2008 at 03:16:50PM +0100, Ash Berlin wrote:
> 
> On 13 Aug 2008, at 14:56, Oleg Kostyuk wrote:
> 
> >Hello!
> >
> >I just experienced problems with upgrading Catalyst::Action::REST to  
> >0.63:
> >
> >.......
> >*** Module::AutoInstall configuration finished.
> >ERROR: perl: Version 5.008008 is installed, but we need version >= 5.8
> >at inc/Module/Install/Makefile.pm line 172.
> >
> >
> >Following patch fixes this error:
> >
> >tux# diff -u inc/Module/Install/Makefile.pm.orig inc/Module/Install/ 
> >Makefile.pm
> >--- inc/Module/Install/Makefile.pm.orig 2008-08-13  
> >16:39:22.000000000 +0300
> >+++ inc/Module/Install/Makefile.pm      2008-08-13  
> >16:47:23.000000000 +0300
> >@@ -170,7 +170,7 @@
> >       }
> >
> >       if ( my $perl_version = $self->perl_version ) {
> >-               eval "use $perl_version; 1"
> >+               eval "use v$perl_version; 1"
> >                       or die "ERROR: perl: Version $] is installed, "
> >                       . "but we need version >= $perl_version";
> >       }
> >tux#
> >
> >-- 
> >Sincerely yours,
> >Oleg Kostyuk (CUB-UANIC)
> 
> Kudos for the effort of supplying a patch, but everything in the inc  
> directory is auto generated by Module::Install.
> 
> The problem infact lies in Module::Install::Metadata and its  
> perl_version fuction
> 
>      $version =~ s/^(\d+)\.(\d+)\.(\d+)$/sprintf("%d.%03d%03d", 
> $1,$2,$3)/e;
> 
> needs to be
> 
>      $version =~ s/^(\d+)\.(\d+)(?:\.(\d+))?$/sprintf("%d.%03d%03d", 
> $1,$2,$3 || 0)/e;
> 
> I suspect.
> 
> Can you please turn this into a proper diff and submit it as a bug to 
> bugs-module-install at rt.cpan.org then let us know the ticket id so we can 
>  chase it up.

That looks much more sensible. If memory serves, vstrings like that aren't
particularly portable across the different versions of perl M::I supports.

If you can whip up a patch along ash's lines I'll happily apply it to M::I

-- 
      Matt S Trout       Need help with your Catalyst or DBIx::Class project?
   Technical Director                    http://www.shadowcat.co.uk/catalyst/
 Shadowcat Systems Ltd.  Want a managed development or deployment platform?
http://chainsawblues.vox.com/            http://www.shadowcat.co.uk/servers/



More information about the Catalyst mailing list