in reply to Re: Template Method contra passing subroutines to constructor.
in thread Template Method contra passing subroutines to constructor.
Nothing stopping you from doing that:
my $sub = sub { . . . }; my $obj1 = Foo->new( $sub ); my $obj2 = Foo->new( $sub );
----
I wanted to explore how Perl's closures can be manipulated, and ended up creating an object system by accident.
-- Schemer
: () { :|:& };:
Note: All code is untested, unless otherwise stated
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Template Method contra passing subroutines to constructor.
by perrin (Chancellor) on Jan 13, 2004 at 18:54 UTC | |
by hardburn (Abbot) on Jan 13, 2004 at 19:06 UTC | |
by perrin (Chancellor) on Jan 13, 2004 at 19:09 UTC |