Hello,
I am having a series of packages that call other packages one after the other. Let 
assume that i have two packages A and B. All of these are implemented in  seperate 
files. Typically package A's subroutine would call a sub routine in package B. 

If i declare a variable in a subroutine in package A, is there any way of accessing 
this variable in package B's subroutine that is called from A without having to 
specify the package name?

Consider the example below:

A.pm
====
package A;
use B;
sub main{
#ScopeVariable here should be accessible in package B
$ScopeVariable = "In Package A";
B::main();
}
1;

B.pm
====
package B;
use C;
sub main{
#the ScopeVariable in A::main should be accessible here, without having to specify the 
package name, is this possible?
}
1;

I know for sure that if i use an access specifier $A::ScopeVariable then it will work 
fine. I have tried various scope specifiers like my, local and ours.
thanks in advance,
aditya

**************************Disclaimer************************************

Information contained in this E-MAIL being proprietary to Wipro Limited is 
'privileged' and 'confidential' and intended for use only by the individual
 or entity to which it is addressed. You are notified that any use, copying 
or dissemination of the information contained in the E-MAIL in any manner 
whatsoever is strictly prohibited.

***************************************************************************

_______________________________________________
ActivePerl mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to