KW Perl Mongers | Perl Modules: A Look Under the Hood | #10 |
Making an OO Module: Bless
bless $objref, $class;
package Cards; sub new { my $class = $_[0]; my $objref = { _suit => $_[1], _name => $_[2] }; bless $objref, $class; return $objref; } |
<< Previous | Index | Next >> | Copyright © 2004 Daniel Allen |