in reply to How to do "use Mumble ':all' " ala CGI.pm

I wanted the same thing so I wrote Exporter::Easy. It's a frontend to Exporter, it allows you to do
use strict; package MyModule; use Exporter::Easiest qw( :base => $base1 $base2 :extra => $extra1 $extra2 :bonus => $bonus1 $bonus2 :useful => $extra1 $bonus1 :useless => :extra :bonus !:useful :no_bonus => :all !:bonus EXPORT => :base ALL => all OK => $not_exported_by_default ); $base1 = 1; $base2 = 2; ...
this code

I think this does everything you're looking for.

Replies are listed 'Best First'.
Re^2: How to do "use Mumble ':all' " ala CGI.pm
by shenme (Priest) on Sep 20, 2004 at 13:31 UTC
    I was going to reply to ikegami's posting that "surely somebody had done something like this before", and you had! I don't know how I missed the module on search.cpan.org when searching on the word 'exporter'. It pops up blinking now.

    It looks like the syntax

    use Exporter::Easiest q( :hdr_lens => LIS_TIF_HDR_LEN LIS_TIF_HDR_DATA_MAX LIS_PHY_HDR_LEN LIS_LR_HDR_LEN :phyhdr_flags => . . . . :lr_types => . . . . . . . . :all => :hdr_lens :phyhdr_flags :lr_types . . . . );
    would have gotten me what I wanted. And I like the idea of automatically doing the "use vars" on mentioned variables. Thanks!