neilwatson has asked for the wisdom of the Perl Monks concerning the following question:
Consider this sub from Bot::BasicBot
sub _fork_said { my ($self, $body, $wheel_id) = @_[OBJECT, ARG0, ARG1]; chomp $body; # remove newline necessary to move data; # pick up the default arguments we squirreled away earlier my $args = $self->{forks}{$wheel_id}{args}; $args->{body} = $body; $self->say($args); return; }
What does the first line in the sub do? It would seem to me to set off a strict error. Original code here.
Neil Watson
watson-wilson.ca
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: What does @_[OBJECT, ARG0, ARG1] mean?
by toolic (Bishop) on Feb 27, 2016 at 21:47 UTC | |
by neilwatson (Priest) on Feb 27, 2016 at 22:15 UTC | |
|
Re: What does @_[OBJECT, ARG0, ARG1] mean?
by AnomalousMonk (Archbishop) on Feb 27, 2016 at 22:08 UTC | |
|
Re: What does @_[OBJECT, ARG0, ARG1] mean?
by thomas895 (Deacon) on Feb 28, 2016 at 00:53 UTC |