in reply to Re: Re: Re: Re: Which name for a new cpan module?
in thread Which name for a new cpan module?

Another option is namespace munging:
package Ivy; # in Ivy.pm { no strict 'refs'; *{"Xxx::Ivy::"} = *{"Ivy::"}; }

That should handle most exporting and inheritance issues by making the two packages equivalent...

Replies are listed 'Best First'.
Re^6: difference between *{"Xxx::Ivy::"} = *{"Ivy::"}; and use base Net::Ivy; ?
by christopheM (Beadle) on Nov 25, 2003 at 17:51 UTC
    *{"Xxx::Ivy::"} = *{"Ivy::"}; is this different from the previous proposal based on use base Net::Ivy; ?

    Where is it possible to find the doc of the 'use base ...;' construct?

      ... is this different from the previous proposal...

      Yes. The "use base" technique makes one class inherit from the other, whereas this technique makes the two namespaces equivalent.

      A key difference is that inheritance only works for method calls, whereas namespace aliasing works for both methods and function calls.

      Where is it possible to find the doc of the 'use base ...;' construct?

      The base module is included with Perl, so you should be able to run perldoc base for documentation.