If I'm not mistaken, all Perl objects are references to a hash.


Not correct at all.
Perl objects can be anything that's the blessed references.

You can say any the below:

sub new {
   my $class = shift;
   my $var = 'foo';
   bless \$var,$class;
}

sub new {
   my $class = shift;
   my %hash = (...);
   bless \%hash,$class;
}

sub new {
   my $class = shift;
   my @array = (...);
   bless [EMAIL PROTECTED],$class;
}

sub new {
   bless [...],shift;
}

sub new {
   bless {...},shift;
}

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to