in reply to Re: Exporter::Dream
in thread Exporter::Dream

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.

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.

Replies are listed 'Best First'.
Re: Re: Re: Exporter::Dream
by Anonymous Monk on Jan 06, 2003 at 20:32 UTC
    Please consider signing up if you can (that is: if you own your own thoughts).

    What does that mean?

        Ah, got it now, thanks :).

      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...

        Sign up for an account, if you want to:

        No thanks.

        claim your thoughts as your own....

        That's okay, you can have them. Information is better when people don't try and control it :).

        put a name to your words....

        Why? Then the message is lost. Many will judge what you say based on their previous impression of you. They'll either blindly accept what you say as truth, or blindly disregard it.

        take responsibility for your words....

        I take just as much responsibility as you do. I don't have anymore privacy than you. I can be tracked just as easily. Responsbility is the same either way.

        stop hiding behind the Anonymous Monk...

        Just because someone doesn't sign up an account and state their life story on every website they visit doesn't mean they're hiding :).

        Hey Brother Christian with your high and might errand,
        Your actions speak so loud, I can't hear a word you're saying.
        Bad Religion

        There are also many good reasons why someone wouldn't want to sign up an account. Take a minute, I'm sure you can come up with a few.