tall_man has asked for the wisdom of the Perl Monks concerning the following question:
use strict; sub odd_args { my($this, %$args) = @_; print $args->{x},"\n"; } odd_args(1, x => 2);
I don't think he should have done it that way, but strangely enough, it worked in perl 5.6.1. It fails in perl 5.8.0.
% perl5.6.1 qqq.pl 2 % /usr/local/bin/perl5.8.0 qqq.pl Can't declare hash dereference in my at qqq.pl line 4, near ") =" Execution of qqq.pl aborted due to compilation errors.
Does anyone know what happened between perl 5.6.1 to open and then close this loophole?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Arg passing trick that fails in perl 5.8
by Abigail-II (Bishop) on Jan 10, 2003 at 18:02 UTC | |
|
Re: Arg passing trick that fails in perl 5.8
by tadman (Prior) on Jan 10, 2003 at 15:51 UTC | |
by pfaut (Priest) on Jan 10, 2003 at 16:52 UTC | |
by tall_man (Parson) on Jan 10, 2003 at 16:20 UTC | |
|
Re: Arg passing trick that fails in perl 5.8
by pfaut (Priest) on Jan 10, 2003 at 15:51 UTC | |
|
Re: Arg passing trick that fails in perl 5.8
by pg (Canon) on Jan 12, 2003 at 01:33 UTC | |
|
Re: Arg passing trick that fails in perl 5.8
by Aristotle (Chancellor) on Jan 12, 2003 at 02:08 UTC | |
by tall_man (Parson) on Jan 13, 2003 at 03:47 UTC |