in reply to Re: use module with parameter variable
in thread use module with parameter variable

I must be missing the point:
BEGIN { require Getopt::Declare; import Getopt::Declare $string => $options; }
This implies that $string is defined in an earlier BEGIN, doesn't it?

-QM
--
Quantum Mechanics: The dreams stuff is made of

Replies are listed 'Best First'.
Re^3: use module with parameter variable
by revdiablo (Prior) on Aug 19, 2004 at 21:57 UTC

    $string could be defined inside the BEGIN block, or the BEGIN block could be left out altogether. I only included it in my example out of sheer reflex. :-) Here's another example that might be more useful:

    my $options; my $string = <<'HERE'; -one <one:i> First parameter HERE require Getopt::Declare; import Getopt::Declare $string => $options;