sub my_push { my $self = shift; return unless $self->{verbose}; push @{$self->{output}}, @_; } # Somewhere later ... $self->my_push( ["chmod:\t$dir"] );
And, every call to push is converted into a call to my_push(). This is how OO is meant to be used.
------
We are the carpenters and bricklayers of the Information Age.
Then there are Damian modules.... *sigh* ... that's not about being less-lazy -- that's about being on some really good drugs -- you know, there is no spoon. - flyingmoose
I shouldn't have to say this, but any code, unless otherwise stated, is untested
In reply to Re: Personally defined pragmas
by dragonchild
in thread Personally defined pragmas
by crabbdean
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |