true_atlantis has asked for the wisdom of the Perl Monks concerning the following question:
package one; sub new { my ($class,%args)=@_; my $self=(); $self->{test}='test'; bless($self,$class); return($self); } 1;
#!/usr/bin/perl use Data::Dumper; use one; my $x=one->new(); print(Dumper($x));
$VAR1 = bless( { 'test' => 'test' }, 'one' );
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Access custom classes 'self' array
by kyle (Abbot) on Sep 11, 2007 at 03:49 UTC | |
|
Re: Access custom classes 'self' array
by CountZero (Bishop) on Sep 11, 2007 at 06:03 UTC | |
by true_atlantis (Acolyte) on Sep 11, 2007 at 06:42 UTC | |
by CountZero (Bishop) on Sep 11, 2007 at 14:21 UTC | |
|
Re: Access custom classes 'self' array
by Corion (Patriarch) on Sep 11, 2007 at 06:48 UTC | |
|
Re: Access custom classes 'self' array
by eric256 (Parson) on Sep 11, 2007 at 14:26 UTC |