[EMAIL PROTECTED] wrote:
Thanks Shawn. But, in this case, how would we send a parameter to the module
from the calling script. The module can see the name of the calling script, but
I want to make my module available to other perl programmers, and let them have
the flexibility of deciding which use statements they want from the module.

Wait a minute. Someone's being silly. Unless you're talking about groups of modules, you (or they) should 'use' them by the original names. But to answer your question, change the main script as follows.

#!/usr/bin/perl

use strict;
use warnings;

BEGIN {
  our $use_parameter = 'secret_code';
}
use PerlMQ;

__END__


# PerlMQ

our $use_parameter;
use if $use_parameter eq 'secret_code', Module => undef;

1;
__END__



--

Just my 0.00000002 million dollars worth,
   --- Shawn

"Probability is now one. Any problems that are left are your own."
   SS Heart of Gold, _The Hitchhiker's Guide to the Galaxy_

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to