Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
Toolkit looks like it may be on the right track... but don't ignore the obvious, this sort of thing works:
package Module::DemoGroupExport; # doom@kzsu.stanford.edu # 26 Feb 2009 =head1 NAME Module::DemoGroupExport - repaces many "use" statements with one =head1 SYNOPSIS use Module::DemoGroupExport qw( carp croak Dumper mkpath dirname ); my $file = shift; my $loc = dirname( $file ); unless (-d $loc) { carp "Creating $loc..."; mkpath( $loc ) or croak "Could not create $loc: $!"; } =head1 DESCRIPTION Demonstration of a simple strategy for ganging together multiple use statments for many Exporter-based modules into one, so that you can replace many lines of commonly used "use" statements with a single one. Note: automatic exporting is now frowned upon -- better to explicitly state what you want. =head2 EXPORT None by default. =cut use 5.8.0; use strict; use warnings; use Carp qw( carp cluck croak confess shortmess longmess ); use Data::Dumper qw( Dumper ); use File::Path qw( mkpath ); use File::Basename qw( fileparse basename dirname ); use File::Copy qw( copy move ); use Cwd qw( cwd abs_path ); require Exporter; our @ISA = qw(Exporter); our %EXPORT_TAGS = ( 'all' => [ qw( carp cluck croak confess shortmess longmess Dumper mkpath fileparse basename dirname copy move cwd abs_path ) ] ); our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } ); our @EXPORT = qw( ); # exported into callers namespace by default. # (don't use this without a very good reason.) our $VERSION = '0.01'; 1; =head1 SEE ALSO o The cpan module L<Toolkit> =head1 AUTHOR Joseph Brenner, E<lt>doom@kzsu.stanford.eduE<gt> =head1 COPYRIGHT AND LICENSE Copyright (C) 2009 by Joseph Brenner This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.2 or, at your option, any later version of Perl 5 you may have available. =head1 BUGS None reported... yet. =cut

In reply to Re: how do you include multiple modules using one module by doom
in thread how do you include multiple modules using one module by diabelek

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



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (2)
As of 2024-04-24 23:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found