in reply to Dynamically Changing Your Namespace

To alias a namespace, Package::Alias should be sufficient. To remove a namespace, Package::Reaper.

-M

Free your mind

  • Comment on Re: Dynamically Changing Your Namespace

Replies are listed 'Best First'.
Re^2: Dynamically Changing Your Namespace
by educated_foo (Vicar) on Mar 30, 2007 at 14:14 UTC
    Argh... another two CPAN one-liner modules:
    # alias *{$new_package . '::'} = *{$old_package . '::'}; # remove undef *{$new_package . '::'};
      Is there something virtuous about using a lot of code to do something?

      -M

      Free your mind

        Not sure where you got that impression. My point was that those two modules were doing things that can be accomplished in plain Perl with a single, simple statement. Therefore using a module for these tasks actually *adds* complexity to your code.