in reply to How not to hardcode a package name?
While I know that it wouldn't be elegant, isn't there an eval-based way to do this? I tried the simple-minded
my $a = 'Package'; eval "package $a";,
but it doesn't work (I suspect because I don't really understand the eval EXPR form).
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How not to hardcode a package name?
by ikegami (Patriarch) on Aug 28, 2008 at 20:28 UTC | |
by JadeNB (Chaplain) on Aug 28, 2008 at 20:48 UTC | |
by ikegami (Patriarch) on Aug 28, 2008 at 21:01 UTC | |
|
Re^2: How not to hardcode a package name?
by blazar (Canon) on Aug 28, 2008 at 22:45 UTC |