installing scripts (was:Re: [Bioperl-l] GFF scripts)

Jason Stajich jason at cgt.duhs.duke.edu
Sun Aug 10 19:50:53 EDT 2003


On Sun, 10 Aug 2003, Koen van der Drift wrote:

>
>
> > My knowledge of perl is limited, so I am not sure how to proceed from
> > here. Is there a MakeFile.PL that installs the scripts and works with
> > 1.2.2? Or maybe I forgot to copy some essential lines from the newer
> > Makefile.PL?
>
> OK, I am a little bit further :) I solved the rmtree problem by adding
> the following lines:
>
> use File::Path 'rmtree';
> use IO::File;
> use Config;

what verions of File::Path is on your system?  Perhaps the problem is the
tests were run on systems with newer File::Path which previously exported
rmtree.

>
> I did the other two 'just in case'. Now scripts get installed, but only
> a few: bp_flanks.pl, bp_mrtrans.pl, bp_sreformat.pl and
> bp_taxi4dspecies.pl.
>
> Careful examination of the code reveals that only the scripts that have
> an .PLS extension will be installed, which are exactly the 4 scripts
> that get installed. All other scripts already have the .pl extension,
> and thus will not be installed. So I modified the script as follows:
>

The intention is to ONLY install scripts which end in .PLS.  This whole
process also fixes the perl path in the header of the script as well.

The problem is that this install code was ported from the CVS HEAD to the
branch and I don't think all the underlying scripts were renamed.

I think that all of these problems go away when you work off the main
trunk.



> sub install_contents {
>    my $dir  = shift;
>    my $dest = shift;
>    my $bangline = $Config{startperl};
>
>    my @files;
>    opendir (D,$dir) or die "Can't open $dir: $!\n";
>    while (my $script = readdir(D)) {
>   #   next unless $script =~ /\.PLS$/;
>      my $in  = IO::File->new("$dir/$script")    or die "Can't open
> $dir/$script: $!";
>
> 	if ($script =~ /\.PLS$/) {
>      	$script =~ s/\.PLS$/\.pl/;                   # change from .PLS to
> .pl
> 	}
>      next unless $script =~ /\.pl$/;
>
>    ... etc
>
> Which indeed seems to do the trick.
>
> Would this change give any other problems that I might overlook?
>
>
> thanks again,
>
> - Koen.
>
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at portal.open-bio.org
> http://portal.open-bio.org/mailman/listinfo/bioperl-l
>

--
Jason Stajich
Duke University
jason at cgt.mc.duke.edu


More information about the Bioperl-l mailing list