in reply to passing the reference from a class.
As you don't show us in what way Perl "does not want" to dump the second one, it's kinda hard to guess what happens in the code you've omitted. But there is one line that doesn't do what you might think it does:
sub create { my $self = @_; ...
Here, $self will likely have the value 1, because that's the number of elements in @_. If you want to assign the first value in @_ to $self, you need parentheses:
my ($self) = @_;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: passing the reference from a class.
by baxy77bax (Deacon) on Jul 20, 2008 at 20:04 UTC | |
by Corion (Patriarch) on Jul 20, 2008 at 20:08 UTC |