same namespace as main
Hi,
I want to "include" some code in my main. this code should access
variables and functions of the main. can I load code in the same
namespace as the loader is?
---
main.pl: # or any including module
---
my $module_name = "path/name.pl";
my $var1;
my $obj1 = new Object1;
sub func1 {
...
}
....
do/require? "$module_name"; # dynamicly include some code
---
path/name.pl:
---
package name; # ??
my $var2;
....
$var1 = some_calculation(); # access variables from main/parent
module
func1($var2);
$obj1->method();
.
Relevant Pages
- Package is ambiguous in the namespace DTS
... 'Package' is ambiguous in the namespace 'DTS' ... Prev by Date: ... (microsoft.public.sqlserver.dts) - Re: Information hiding in CLOS?
... protected and private members. ... If you declare some x in a class C, then that x is a member of the C ... can exist independently of namespace containment. ... current package context. ... (comp.lang.lisp) - Re: I really hate .NET especially inside Delphi
... in Delphi.NET terms this is a package (yeah, yeah, I don't know why ... to a BPL it will compile to a dll, ... will see a namespace called TimsTest with TTestClass in it, ... in a Delphi app in the Uses class you would put ... (borland.public.delphi.non-technical) - Re: why cl packages are hard to use ?
... with are interned by the reader, and most non-advanced Lisp programmers ... qualify our symbols with the name of some package, ... applied very effectively and modularly to any namespace problem. ... To contrast with the situation in Ruby, ... (comp.lang.lisp) - Re: why cl packages are hard to use ?
... believe that USE-PACKAGE is a Bad Thing, how exactly am I supposed to ... make my own package and still be able to use Common Lisp? ... are inheriting from a stable namespace. ... I will firmly advocate the position that the "COMMON-LISP" namespace and its ... (comp.lang.lisp) |
|