in reply to Looking for suggestions for accessing/running scripts needed by a local Perl library
My guess is that you want to keep this stuff in Perl scripts because you only occasionally use this functionality. I would convert my scripts both to actual modules and in some cases methods that load via AutoLoader.
#!/usr/bin/perl -w use strict; use lib qq~./mydir~; require qq~./code.pm~; #use Foo; print Foo::foo(); 1;
package Foo; use AutoLoader 'AUTOLOAD'; # import the default AUTOLOAD subroutine 1;
Note that your .al files have to be in a particular directory. in this case it is here: ./mydir/auto/Foo/foo.al
package Foo; sub foo { return 'tastes so good...'; } 1;
perl code.pl tastes so good...
Celebrate Intellectual Diversity
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Looking for suggestions for accessing/running scripts needed by a local Perl library
by nysus (Parson) on Jan 24, 2024 at 04:10 UTC |