[EMAIL PROTECTED] wrote:

This is one way of doing it. Probably there could be some other short
and sweet ways of doing it. I'm also waiting for such an answer.

push( @INC, $path ); require package_name; package_name->import(); # pulls in exported symbols


-----Original Message-----
From: PerlDiscuss - Perl Newsgroups and mailing lists
[mailto:[EMAIL PROTECTED]
Sent: Thursday, July 29, 2004 10:45 AM
To: [EMAIL PROTECTED]
Subject: Modifying @INC


I want to add some paths to the @INC array to resolve certain package names at runtime.

One of the methods is: "push(@INC,$path) or unshift($path,@INC)" and
then
say "require package_name;".
the problem with this is that we still need to use the "::" operator
with
the symbols to resolve the package namespace.
eg: package_name::test_sub();


-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>




Reply via email to