in reply to Nested Classes
Well, yes but I'm not quite sure why you'd want to do this.
Is this what you want?
Update: Changed PRE tags to CODE tags as per chipmunk's request. Sorry, won't do it again :)#!perl -w use strict; my $a = 'foo'; my $b = \$a; bless $b, 'bar'; sub bar::f1 { my $self = shift; print "f1 prints [$$self]\n"; } *bar::f2 = sub { my $self = shift; print "f2 prints [$$self]\n"; }; $b->f1(); $b->f2();
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: Nested Classes
by InfiniteSilence (Curate) on Mar 02, 2001 at 20:57 UTC | |
by Tyke (Pilgrim) on Mar 05, 2001 at 13:23 UTC |
In Section
Seekers of Perl Wisdom