crabbdean has asked for the wisdom of the Perl Monks concerning the following question:
I'm wondering if its possible to create a pragma just for my module? I've created a module in which every call to "push" is only performed if a verbose option is set.
push (@{$self->{output}}, ["chmod:\t$dir"]) if ($self->{verbose});
Is it possible to create this so its just like this ...
push (@{$self->{output}}, ["chmod:\t$dir"]);
... but only within my module?
Dean
The Funkster of Mirth
Programming these days takes more than a lone avenger with a compiler. - sam
RFC1149: A Standard for the Transmission of IP Datagrams on Avian Carriers
push (@{$self->{output}}, ["chmod:\t$dir"]) if ($self->{verbose});
Is it possible to create this so its just like this ...
push (@{$self->{output}}, ["chmod:\t$dir"]);
... but only within my module?
Dean
The Funkster of Mirth
Programming these days takes more than a lone avenger with a compiler. - sam
RFC1149: A Standard for the Transmission of IP Datagrams on Avian Carriers
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Personally defined pragmas
by borisz (Canon) on Jun 07, 2004 at 10:41 UTC | |
by crabbdean (Pilgrim) on Jun 07, 2004 at 10:51 UTC | |
Re: Personally defined pragmas
by dragonchild (Archbishop) on Jun 07, 2004 at 11:37 UTC | |
by crabbdean (Pilgrim) on Jun 07, 2004 at 23:27 UTC | |
Re: Personally defined pragmas
by BUU (Prior) on Jun 07, 2004 at 11:19 UTC | |
Re: Personally defined pragmas
by BrowserUk (Patriarch) on Jun 07, 2004 at 11:00 UTC | |
Re: Personally defined pragmas
by andyf (Pilgrim) on Jun 07, 2004 at 10:38 UTC |
Back to
Seekers of Perl Wisdom