6 my $build = Module
::Build
->current;
8 my %symlink_scripts = ('bp_bulk_load_gff.pl' => 'bp_pg_bulk_load_gff.pl');
10 #my $blib_dir = File::Spec->catdir($build->blib, 'script');
11 # using blib prior to installation, post build, always 'works', but the
12 # installation process installs the symlink as the actual file, so we may as
13 # well have just done a copy
15 my $install_dir = $build->install_destination('script');
16 $build->log_info("Will try to install symlinks to $install_dir\n");
17 my $orig_dir = $build->cwd;
20 while (my ($source, $destination) = each %symlink_scripts) {
22 eval { symlink($source, $destination) };
23 $build->log_warn("Cannot create symbolic link named $destination on your system for $source in $install_dir\n") if $@
;
25 # Win32 perl does not implement symlink(), as it would not work on all filesystems.
27 eval { File
::Copy
::copy
($source, $destination) };
28 $build->log_warn("Cannot create copy of script named $destination on your system for $source in $install_dir\n") if $@
;
40 symlink_script.pl - install script to create symbolic links
49 Used during "./Build install". Only works if the script installation directory
50 used during "perl Build.pl" matches that used for the actual installation during
51 "./Build install". So if you install to a special place, do
53 perl Build.pl --install_base /home/me
59 ./Build install --install_base /home/me
61 This script will create a symlink to a script in that same directory. It was
62 written to create a symlink with the name 'bp_pg_bulk_load_gff.pl' that targeted
63 'bp_bulk_load_gff.pl' but can be extended by adding files to the
64 %symlink_scripts hash.
66 Perl function 'symlink' is used to keep the script from crashing on systems
67 that don't allow symbolic linking.
77 User feedback is an integral part of the evolution of this and other
78 Bioperl modules. Send your comments and suggestions preferably to
79 the Bioperl mailing list. Your participation is much appreciated.
81 bioperl-l@bioperl.org - General discussion
82 http://bioperl.org/wiki/Mailing_lists - About the mailing lists
86 Report bugs to the Bioperl bug tracking system to help us keep track
87 of the bugs and their resolution. Bug reports can be submitted via the
90 https://redmine.open-bio.org/projects/bioperl/
92 =head1 AUTHOR - Sendu Bala