in reply to Include stubmaker-generated pm file in calling script!

eval {use AdminService qw (:all); };

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

use File::Spec; use Cwd(); use lib File::Spec->catfile( Cwd::cwd(), 'mysubdirectory' );
but cwd isn't what you want, you want
File::Spec->catfile( File::Basename::dirname( File::Spec->rel2abs(__FI +LE__) ), '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.

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
    Ok, thank you for your reply! But I also want to know if alt. 1 is possible?

    I.e, can I take the contents from service.pm and put it in caller.pl?
        Thank you, that helped a lot! Mission accomplished:)