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.


In reply to Re: Re: Exporter::Dream by Juerd
in thread Exporter::Dream by Juerd

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.