[Bioperl-l] Bioperl CPAN installation issues

Fields, Christopher J cjfields at illinois.edu
Tue Mar 13 19:39:07 UTC 2012


The versioning mechanism for BioPerl is a little screwy, in that it relies on inheriting the VERSION rather than actually defining it per module.  We plan on changing this as we split out modules (I'm actually working on this now).  

My fix for this, and probably the simplest solution?  Require a modern version of Graph, and remove the offending lines.  Committed in 0930270783.

chris
 
On Mar 13, 2012, at 1:13 PM, Francisco J. Ossandón wrote:

> This has happened to me since long ago in previous installations, but I had
> forgot about it until today...
> 
> Looking around in Google led me to this page:
> http://mail.pm.org/pipermail/pdx-pm-list/2010-April/005803.html
> 
> It says:
> ###
> 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. 
> ###
> 
> So apparently, the "( defined $Graph::VERSION && $Graph::VERSION >= 0.5 ) ?"
> line is read when the CPAN Client is trying to find a $VERSION that it can
> use for upgrade reference, and it gets confused at this point.
> 
> Since "Bio::Ontology::SimpleGOEngine::GraphAdaptor" depends on
> "Bio::Root::Root", maybe adding a "use Bio::Root::Version;" to the Root.pm
> module will let the $VERSION global variable to reach the GraphAdaptor
> module and all the other modules who depends on it??? I noticed that
> "RootI.pm" have a Bio::Root::Version dependency but Root.pm don't have it
> (at least explicitly). I still need more experience using global variables,
> but it could be that the reason that Bioperl modules shows "undef" after
> installation is because CPAN don't reach $VERSION properly for the all
> modules of the bundle.
> 
> Cheers,
> 
> Francisco J. Ossandon
> 
> -----Mensaje original-----
> De: bioperl-l-bounces at lists.open-bio.org
> [mailto:bioperl-l-bounces at lists.open-bio.org] En nombre de Fields,
> Christopher J
> Enviado el: martes, 13 de marzo de 2012 13:40
> Para: Francisco J. Ossandón
> CC: <bioperl-l at bioperl.org>
> Asunto: Re: [Bioperl-l] Bioperl CPAN installation issues
> 
> That is a bit odd, but it has been reported before.  I haven't been able to
> dedicate any time to tracing it down, so any help is appreciated:
> 
> https://redmine.open-bio.org/issues/3041
> 
> chris
> 
> On Mar 13, 2012, at 11:21 AM, Francisco J. Ossandón wrote:
> 
>> Hello,
>> 
>> Today I was updating my Perl modules using the CPAN client, through 
>> the "upgrade" command (Im using strawberry perl, not activestate), and 
>> something weird popped up.
>> 
>> 
>> 
>> I have installed Bioperl version 1.006901, which is the same one in 
>> CPAN, but the client don't recognize the installed Bioperl version and 
>> throws an "undef" version instead, so it reinstall the whole thing again
> if told so.
>> Also, while Perl was checking the versions of the installed modules to 
>> compare them to CPAN latest versions, it throws an error with a lot of 
>> code saying that it could not eval
> "Bio\Ontology\SimpleGOEngine\GraphAdaptor.pm".
>> 
>> 
>> 
>> Please see the output below and check the "Bio::Align::AlignI" and 
>> "Bio\Ontology\SimpleGOEngine\GraphAdaptor.pm" outputs.
>> 
>> #####
>> 
>> cpan> upgrade
>> 
>> Database was generated on Mon, 12 Mar 2012 18:06:06 GMT
>> 
>> 
>> 
>> Package namespace         installed    latest  in CPAN file
>> 
>> DBD::mysql                    4.018     4.020
>> CAPTTOFU/DBD-mysql-4.020.tar.gz
>> 
>> IO::Socket::SSL                1.39      1.59
>> SULLR/IO-Socket-SSL-1.59.tar.gz
>> 
>> Bio::Align::AlignI            undef  1.006901
>> CJFIELDS/BioPerl-1.6.901.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
>> C:\strawberry\perl\site\lib\Bio\Ontology\SimpleGOEngine\GraphAd
>> 
>> aptor.pm: syntax error at (eval 429) line 17, at EOF
>> 
>> 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
>> C:\strawberry\perl\site\lib\Bio\Ontology\SimpleGOEngine\GraphAd
>> 
>> aptor.pm: syntax error at (eval 430) line 17, at EOF
>> 
>> Error::Simple                 undef         0
> SHLOMIF/Error-0.17017.tar.gz
>> 
>> #####
>> 
>> 
>> 
>> Cheers,
>> 
>> 
>> 
>> Francisco J. Ossandon
>> 
>> 
>> 
>> 
>> _______________________________________________
>> Bioperl-l mailing list
>> Bioperl-l at lists.open-bio.org
>> http://lists.open-bio.org/mailman/listinfo/bioperl-l
> 
> 
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioperl-l
> 





More information about the Bioperl-l mailing list