Prasanna kothari wrote:

>try this
> "use lib <pathname>";

Randy W. Sims wrote:

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

Well these are real sweet ways, I agree..... No BEGIN blocks required
and no hassles.

But is there any way to avoid this Exporting stuff ?? Probably my
question is blunt.... But if there is a solution I would love to follow
it.

By the way I also think that there should not be a solution as that
might affect OO concepts of PERL.

Any additional info would help me a lot.

With Best regards,
R. Kamal Raj Guptha.


-----Original Message-----
From: Randy W. Sims [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 29, 2004 3:48 PM
To: R. Kamal Raj Guptha (WT01 - TELECOM & INTER-NETWORKING SOLUTIONS)
Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: Modifying @INC


[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();
>




Confidentiality Notice

The information contained in this electronic message and any attachments to this 
message are intended
for the exclusive use of the addressee(s) and may contain confidential or privileged 
information. If
you are not the intended recipient, please notify the sender at Wipro or [EMAIL 
PROTECTED] immediately
and destroy all copies of this message and any attachments.

--
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