in reply to Exporter::Dream

What an awful name (I'm not usually this blunt but it is worse than calling it Exporter::Dandy). Exporter::Prefixing would at least be descriptive. Why don't you roll these few extra features into one of the other exporting modules?

Having lots of choices of similar modules might be nice for people writing scripts (and it might not). But it isn't very nice for people writing modules. Exporters are only used by modules.

We already have a lots of reluctance among users to download modules because of the many headaches they run into. Now you want people downloading modules to end up downloading 4 or 5 different Exporter modules as well? I don't think the person trying to get a module installed will appreciate this situation.

Please try to review your own modules with at least as much criticism as you seem to have in abundance for the modules of other people.

I like your couple of little enhancements but don't find them to be nearly enough to justify a new module, especially one for use by module authors.

Replies are listed 'Best First'.
Re: Re: Exporter::Dream
by Juerd (Abbot) on Jan 06, 2003 at 20:22 UTC

    What an awful name (I'm not usually this blunt but it is worse than calling it Exporter::Dandy).

    This name was chosen primarily because I couldn't think of any other name. So far, no one likes the name (including me, actually), so you can be sure it won't be put on CPAN using this name. I like Aristotle's suggestion (Exporter::Tidy). Do you have any suggestions?

    Exporter::Prefixing would at least be descriptive.

    That would describe one of its features, and not some of the others. If I were to release a module specifically to be able to prefix, it would not be a whole new exporter. It'd be something that wraps a lot like

    # untested, written in browser package Exporter::PrefixWrapper; use Carp; sub import { my (undef, $module, $prefix, @symbols) = @_; my $caller = (caller)[0]; eval "package $caller\::__FOO; use $module \@symbols;"; croak $@ if $@; for my $symbol (keys %{ "$caller\::__FOO::" }) { for my $type (qw/CODE SCALAR ARRAY HASH GLOB/) { next if not *{ "$caller\::__FOO::$symbol" }{$type}; *{ "$caller\::$prefix$symbol" } = *{ "$caller\::__FOO::$symbol" }{$type}; } } } 1; =head1 SYNOPSIS use Exporter::PrefixWrapper LWP::Simple => 'lwp_', qw(get $ua); $lwp_ua->agent('FooBar/0.01'); my $page = lwp_get "http://juerd.nl/" =cut
    so that it can be used with existing exporters.

    Having lots of choices of similar modules might be nice for people writing scripts (and it might not). But it isn't very nice for people writing modules.

    I don't see why not. Most of what I write is modular, and I like having alternatives to choose from.

    Now you want people downloading modules to end up downloading 4 or 5 different Exporter modules as well? I don't think the person trying to get a module installed will appreciate this situation.

    This is not a problem. People (should) use CPANPLUS (or CPAN.pm) to make downloading modules and prerequisites easy.

    I like your couple of little enhancements but don't find them to be nearly enough to justify a new module, especially one for use by module authors.

    I want to introduce new syntax as well as a simpler module. I tried to see if this could be added to an existing module, but that would create a mess. Other exporting modules are heavier or have different syntax.

    • Exporter uses @EXPORT etcetera
    • Exporter::Lite uses @EXPORT etcetera
    • Exporter::Simple uses attributes
    • Exporter::VA is heavy
    Then there's Exporter::Cluster, but that's to create bundles of imported subroutines.

    Exporter::Dream (whatever name it will have) is too different to be integrated into an existing exporter module.

    Thanks for commenting. Please consider signing up if you can (that is: if you own your own thoughts).

    - Yes, I reinvent wheels.
    - Spam: Visit eurotraQ.
    

      Please consider signing up if you can (that is: if you own your own thoughts).

      What does that mean?

        Sign up for an account, if you want to:
        claim your thoughts as your own....
        put a name to your words....
        take responsibility for your words....
        stop hiding behind the Anonymous Monk...