[Pdx-pm] cpan ExtUtils::MakeMaker issue

Michael G Schwern schwern at pobox.com
Sat Apr 17 09:03:59 PDT 2010


Tom Keller wrote:
> Greetings,
> I think I got help with this before, but I can't remember the fix. Sorry.
> I'm getting makefile errors that seem to be related to switching to perl 
> 5.10 but somehow messing up which ExtUtils::MakeMaker gets found?

Executive summary:  You can ignore it.  This is "normal" behavior".  The 
upgrade should still work.

Long story short, you asked CPAN to upgrade every installed module matching 
/Bio/ so it had to scan the versions of all the installed .pm files which 
match.  It uses MM->parse_version to do that.

MakeMaker (MM) has to use heuristics to find the line where $VERSION is 
defined for each .pm file and eval that line.  In the case of 
Bio::Ontology::SimpleGOEngine::GraphAdaptor it does not define a $VERSION for 
itself, which is fine, but it does mention it later on.

   sub new {
     my( $class ) = @_;
     $class = ref $class || $class;

     my $self=
       ( defined $Graph::VERSION && $Graph::VERSION >= 0.5 ) ?
         bless ( {}, $class ) :
	  bless ( {}, 'Bio::Ontology::SimpleGOEngine::GraphAdaptor02' );
     $self->{_graph}=new Graph::Directed;
     $self->{_vertex_attributes}={};
     $self->{_edge_attributes}={};
     return $self;
   }

MM->parse_version picked up on that, tried to eval it, and it blew up.


> cpan[3]> upgrade /Bio/                                                   
>                                                 
> 
> Package namespace         installed    latest  in CPAN file
> Bio::Align::AlignI            undef  1.006001  CJFIELDS/BioPerl-1.6.1.tar.gz
> Bio::Factory::EMBOSS          undef  1.006000 
>  CJFIELDS/BioPerl-run-1.6.1.tar.gz
> Could not eval '
>                 package ExtUtils::MakeMaker::_version;
>                 no strict;
>                 BEGIN { eval {
>                     # Ensure any version() routine which might have leaked
>                     # into this package has been deleted.  Interferes with
>                     # version->import()
>                     undef *version;
>                     require version;
>                     "version"->import;
>                 } }
> 
>                 local $Graph::VERSION;
>                 $Graph::VERSION=undef;
>                 do {
>                         ( defined $Graph::VERSION && $Graph::VERSION >= 
> 0.5 ) ?
>                 };
>                 $Graph::VERSION;
>             ' in 
> /Library/Perl/5.10.0/Bio/Ontology/SimpleGOEngine/GraphAdaptor.pm: syntax 
> error at (eval 179) line 17, at EOF


-- 
Look at me talking when there's science to do.
When I look out there it makes me glad I'm not you.
I've experiments to be run.
There is research to be done
On the people who are still alive.
     -- Jonathan Coulton, "Still Alive"


More information about the Pdx-pm-list mailing list