in reply to How could we "implement" Open Classes in Perl ?
package main; use strict; use warnings; use CGI; package CGI; sub foo { my $self = shift; return $self->p('foo'); } package main; my $cgi = CGI->new; print $cgi->foo() . "\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How could we "implement" Open Classes in Perl ?
by Alien (Monk) on Jun 27, 2008 at 08:07 UTC | |
by Your Mother (Archbishop) on Jun 28, 2008 at 04:46 UTC |