Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: Re: Re: Re: Which name for a new cpan module?

by belden (Friar)
on Nov 22, 2003 at 00:54 UTC ( [id://309081]=note: print w/replies, xml ) Need Help??


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

(if your modules are written well, all that should be necessary is ... <snip>)

That'll work if the current Ivy interface is via class/object methods. However, if the current interface is via exported functions/symbols, then the above won't automatically be enough: the functions from Xxx::Ivy will likely only be exported up to Ivy, when really it's Ivy's caller who wants those functions.

dominus's ModuleBundle can shine light here, as can Exporter's export_to_level method.

blyman
setenv EXINIT 'set noai ts=2'

Replies are listed 'Best First'.
Re: Re: Re: Re: Re: Which name for a new cpan module?
by simonm (Vicar) on Nov 22, 2003 at 16:56 UTC
    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...

      *{"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.

Re: Re: Re: Re: Re: Which name for a new cpan module?
by christopheM (Beadle) on Nov 23, 2003 at 14:22 UTC
    thanks for your enlightment

    Originaly Ivy.pm was only function based and it was only possible to use one Ivy bus. It has been extended so that this functionnal interface still works, but usually we are now using a class/instance interface style. Usually there is only one instance of Ivy bus. I think the main exception is when we developped some GUI applications plug-in's. In those plug-ins' a new part of the GUI is added as an external module, and this GUI part is communicating through new instances of Ivy.

    In my current knowledge of perl and according many responses to my quest, I am sure building a full wrapper is possible. The real point now is whether it is worth such complexity as currently this module is quiet simple to understand. My feelings are it does not deserve such complexity if the Ivy name could become a new root name in the CPAN.

    Any way, I will ask the question on the appropriate mailing list on the CPAN.

Re: Re: Re: Re: Re: Which name for a new cpan module?
by Anonymous Monk on Nov 22, 2003 at 01:50 UTC
    Then there is always goto ;)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://309081]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (3)
As of 2024-04-26 00:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found