From 9b48f9e1cdf2d39066c067d78b28bbd957603640 Mon Sep 17 00:00:00 2001 From: Angel Ortega Date: Wed, 5 Oct 2011 13:45:28 +0200 Subject: [PATCH] Fixed AUTOLOAD. --- Art5.pm | 2 +- tests/tests5.pl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Art5.pm b/Art5.pm index e35d7a2..e6f0e6f 100644 --- a/Art5.pm +++ b/Art5.pm @@ -259,7 +259,7 @@ sub exec { } else { if ($self->code('AUTOLOAD')) { - $ret = $self->exec(['AUTOLOAD', $op]); + $ret = $self->exec(['AUTOLOAD', [ '"', $op]]); } else { croak "Artemus5 opcode not found: $op"; diff --git a/tests/tests5.pl b/tests/tests5.pl index b806db7..fd9a550 100644 --- a/tests/tests5.pl +++ b/tests/tests5.pl @@ -12,7 +12,7 @@ $art5->{op}->{ary2} = sub { [ [1, 'a'], [2, 'b'], [3, 'b'], [4, 'c'] ]; }; $art5->{op}->{ary3} = sub { [ [3, 'b'], [1, 'a'], [2, 'k'], [9, 'z'], [7, 'q' ]]; }; $art5->{op}->{link} = sub { "" . $art5->exec(shift) . ""; }; -$art5->{op}->{AUTOLOAD} = sub { "Bad opcode '" . $_[0] . "'"}; +$art5->{op}->{AUTOLOAD} = sub { "Bad opcode '" . $art5->exec($_[0]) . "'"}; sub try { my $code = shift; -- 2.11.4.GIT