in reply to Include stubmaker-generated pm file in calling script!
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Include stubmaker-generated pm file in calling script!
by DreamT (Pilgrim) on Apr 29, 2010 at 06:28 UTC | |
by Anonymous Monk on Apr 29, 2010 at 09:39 UTC | |
by DreamT (Pilgrim) on Apr 30, 2010 at 12:04 UTC |