in reply to Re: pp/prima problem
in thread pp/prima problem

Thanks for the replies.

The modules are all installed ok because the scripts work correctly from the command box and also when I execute them in Eclipse.

It's a pp related problem - here's the full error message:

C:\DOCUME~1\STEVE\MYDOCU~1\JAVA\ECLIPSE\ECLIPSE\WORKSP~1\PERLTEST>a.ex +e Can't locate Prima/Buttons.pm in @INC (@INC contains: CODE(0xcb9f60) C +ODE(0xda9a b8) .) at (eval 48) line 1. BEGIN failed--compilation aborted at (eval 48) line 1. BEGIN failed--compilation aborted at script/prima_pointer.pl line 9.
Does "@INC contains: CODE(0xcb9..." suggest that @INC is being corrupted when the exe fires up?

Replies are listed 'Best First'.
Re^3: pp/prima problem
by bart (Canon) on May 30, 2005 at 19:29 UTC
    Does "@INC contains: CODE(0xcb9..." suggest that @INC is being corrupted when the exe fires up?
    No. It's a way to have smart libraries: by including a callback (a code ref) in @INC. See require:
    You can also insert hooks into the import facility, by putting directly Perl code into the @INC array. There are three forms of hooks: subroutine references, array references and blessed objects.
    (You can read the rest there.)

    What happens, is IMO that pp didn't know that Prima::Buttons is needed, so it didn't include it. Probably, that happens because the module gets required dynamically, I guess it could likely happen with DBD::* modules for DBI, too.

    See the docs for pp, command line option -M:

    % pp -M Foo::Bar hello # Extra modules in the include path