RE: [OT] Dynamically changing current package

2001-02-02 Thread Robert Landrum
NewPackage will then contain all things in TestPackage Then you can redefined everything in TestPackage without affecting anything in NewPackage. Actually it will, if you were to delete NewPackage, TestPackage would not contain anything. Modifying 'thingys' in TestPackage would modify

RE: [OT] Dynamically changing current package

2001-02-02 Thread Stathy Touloumis
Probably just never assumed to be used this way. Do not see to much documentation on using the Symbol table directly. Here is something strange as well. Try copying a package and then creating an object from it . . . Really funky Think I might post this to the p5p list

RE: [OT] Dynamically changing current package

2001-02-01 Thread mgraham
Andrew Ho [EMAIL PROTECTED] wrote: I know how to use "package" in the normal case, where it's static. However, you can't say "package $foo" or even "eval 'package foo'" or even "BEGIN { eval 'package foo' }." I'm wondering if there's any way short of hacking the Perl source itself to

RE: [OT] Dynamically changing current package

2001-02-01 Thread Robert Landrum
You can also change the package using globs. *{NewPackage::} = *{TestPackage::}; NewPackage will then contain all things in TestPackage Then you can redefined everything in TestPackage without affecting anything in NewPackage. You can also do something like for my $name (keys %{Test::})

RE: [OT] Dynamically changing current package

2001-02-01 Thread Stathy Touloumis
NewPackage will then contain all things in TestPackage Then you can redefined everything in TestPackage without affecting anything in NewPackage. Actually it will, if you were to delete NewPackage, TestPackage would not contain anything. Modifying 'thingys' in TestPackage would modify

[OT] Dynamically changing current package

2001-01-31 Thread Andrew Ho
Hello, This isn't strictly a mod_perl question, but is there a good way in general Perl to dynamically change the current package name? Thanks in advance-- Humbly, Andrew -- Andrew Ho http://www.tellme.com/

Re: [OT] Dynamically changing current package

2001-01-31 Thread G.W. Haywood
Hi Andrew, On Wed, 31 Jan 2001, Andrew Ho wrote: This isn't strictly a mod_perl question, but is there a good way in general Perl to dynamically change the current package name? perldoc -f package 73, Ged.