trammell has asked for the wisdom of the Perl Monks concerning the following question: ⭐ (object-oriented programming)
but for some Very Good Reason, we want to be able to call it in a more procedural fashion:use Foo; my $f = Foo->new(%args); my $g = $f->frobnicate;
Is there a good way of doing this? Is there a good reason not to do this?use Foo 'frobnicate'; my $g = frobnicate($args);
Originally posted as a Categorized Question.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How do I make object methods callable as non-OO functions?⭐
by jhourcle (Prior) on Mar 25, 2005 at 03:51 UTC | |
by cazz (Pilgrim) on Mar 25, 2005 at 15:27 UTC | |
|
Re: How do I make object methods callable as non-OO functions?
by cosimo (Hermit) on Jun 30, 2004 at 12:09 UTC | |
|
Re: How do I make object methods callable as non-OO functions?
by Anonymous Monk on Jun 25, 2004 at 21:58 UTC |