in reply to Using a stored condition
my $method1 = '(($a && $b)) || ($c && $d)'; my $method2 = sub { my ($a,$b,$c,$d) = @_; (( $a && $b )) || ($c && $d +) }; }; sub method3 { ... } print "yeah\n" if eval $method1; die $@ if $@; print "yeah\n" if $method2->($a,$b,$c,$d); print "yeah\n" if method3(...);
-Paul
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Using a stored condition
by legend (Sexton) on Mar 02, 2008 at 22:40 UTC | |
by shmem (Chancellor) on Mar 02, 2008 at 22:55 UTC | |
by legend (Sexton) on Mar 02, 2008 at 23:13 UTC | |
by shmem (Chancellor) on Mar 02, 2008 at 23:44 UTC | |
by blazar (Canon) on Mar 03, 2008 at 00:12 UTC | |
| |
by legend (Sexton) on Mar 02, 2008 at 23:22 UTC | |
by TGI (Parson) on Mar 03, 2008 at 00:43 UTC | |
by shmem (Chancellor) on Mar 02, 2008 at 23:50 UTC | |
by jettero (Monsignor) on Mar 02, 2008 at 23:45 UTC | |
by grizzley (Chaplain) on Mar 03, 2008 at 08:53 UTC |