[Bioperl-l] using %packages in Makefile.PL

Sendu Bala bix at sendu.me.uk
Wed Sep 27 09:23:13 UTC 2006


Torsten Seemann wrote:
>>> my %prereq;
>>> while (my ($key, $value) = each %packages) {
>>>   my ($version) = split("/", $value);
>>>   $prereq{$key} = $version;
>>> }
>>>
>>> ...
>>> PREREQ_PM => \%prereq;
>>>
>> I tied this, and it didn't seem to work - maybe it will now with a
>> refreshed head :o)
> 
> Try:
> 	my ($version) = split m{/}, $value;
> 
> I'm not sure what split() does with a string as a pattern (except when it is 
> just a space) ?

It works fine as a string. Nathan didn't clarify what he meant by not 
working, but its probably related to Brian's point about use vs require 
(ie. nothing to do with the question I answered).



More information about the Bioperl-l mailing list