lzcd has asked for the wisdom of the Perl Monks concerning the following question:
package sheep; use strict; sub new { my $proto=shift; my $class=ref{$proto} || $proto; my $self={}; bless($self,$class); return $self; } sub bleet { my $self=shift; return 'Baaaa!'; } package main; use strict; use sheep; my wolf=new sheep; print wolf->bleet()."\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Simple OO
by dws (Chancellor) on Feb 12, 2002 at 06:56 UTC | |
by lzcd (Pilgrim) on Feb 12, 2002 at 06:59 UTC | |
by Kanji (Parson) on Feb 12, 2002 at 07:08 UTC | |
by djantzen (Priest) on Feb 12, 2002 at 07:14 UTC | |
by dws (Chancellor) on Feb 12, 2002 at 07:08 UTC | |
by lzcd (Pilgrim) on Feb 12, 2002 at 07:17 UTC | |
by dws (Chancellor) on Feb 12, 2002 at 07:24 UTC | |
|
Re: Simple OO
by Ryszard (Priest) on Feb 12, 2002 at 07:15 UTC | |
|
Re: Simple OO
by Biker (Priest) on Feb 12, 2002 at 08:03 UTC | |
by lzcd (Pilgrim) on Feb 12, 2002 at 08:33 UTC | |
|
Re: Simple OO
by lzcd (Pilgrim) on Feb 12, 2002 at 07:31 UTC | |
|
Re: Simple OO
by uwevoelker (Pilgrim) on Feb 12, 2002 at 17:13 UTC | |
|
Re: Simple OO
by mortis (Pilgrim) on Feb 13, 2002 at 05:46 UTC |