X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2FVariable-Magic.git;a=blobdiff_plain;f=t%2Flib%2FVariable%2FMagic%2FTestWatcher.pm;h=a8499226e06232d82de7b5ca2d67492b4149e143;hp=98a4b08b85d279ac1e64fd9cd8936519c13fb792;hb=20cffa3667611284cad478382155c3582754240b;hpb=7e4218a22df9d95cb7ee69e807675ec8752caa1e diff --git a/t/lib/Variable/Magic/TestWatcher.pm b/t/lib/Variable/Magic/TestWatcher.pm index 98a4b08..a849922 100644 --- a/t/lib/Variable/Magic/TestWatcher.pm +++ b/t/lib/Variable/Magic/TestWatcher.pm @@ -28,6 +28,7 @@ sub init_watcher ($;$) { croak 'can\'t initialize twice' if defined $wiz; my $types = _types shift; $prefix = (defined) ? "$_: " : '' for shift; + local $@; %mg = (); $wiz = eval 'wizard ' . join(', ', map { "$_ => sub { \$mg{$_}++;" . ($_ eq 'len' ? '$_[2]' : '0') . '}'