Re: How to creating a package.

2004-06-17 Thread Randy W. Sims
Rod Za wrote: what the 'bless' do? A brief introduction to bless: More info can be found in the tutorials included with perl: perlboot perltoot perltooc perlbot perlmod perlmodlib perlmodstyle perlnewmod Also check out the "Online Library" secti

Re: How to creating a package.

2004-06-16 Thread Randal L. Schwartz
> "Rod" == Rod Za <[EMAIL PROTECTED]> writes: Rod> Hi, i like to create somethings like classes in an OOP language. Rod> The code below is correct? Rod> _BEGIN_ Rod> package PACKAGE_NAME; Rod> use strict; Rod> use warnings; Rod> our $VERSION = '0.1'; Rod> sub new{ my $class = shift; Rod>

How to creating a package.

2004-06-16 Thread Rod Za
Hi, i like to create somethings like classes in an OOP language. The code below is correct? _BEGIN_ package PACKAGE_NAME; use strict; use warnings; our $VERSION = '0.1'; sub new{ my $self = {}; $self->{SOME_VAR} = undef; $self->{SOME_VAR2} = undef; bless $self;