use happens at compile time, not at run time . For that to work you would have to write
BEGIN { eval { require AdminService; AdminService->import(':all'); }
my $dir = getcwd; use lib $dir."/mysubdirectory";...
If cwd were what you wanted
but cwd isn't what you want, you wantuse File::Spec; use Cwd(); use lib File::Spec->catfile( Cwd::cwd(), 'mysubdirectory' );
Regarding number 2, I could surely enter the path manually, but the software is supposed to work "out-of-the-box" in different configurations.File::Spec->catfile( File::Basename::dirname( File::Spec->rel2abs(__FI +LE__) ), 'mysubdirectory' )
That is accomplished is by installing the module and program, like Pod::Perldoc and perldoc
In reply to Re: Include stubmaker-generated pm file in calling script!
by Anonymous Monk
in thread Include stubmaker-generated pm file in calling script!
by DreamT
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |