]> git.donarmstrong.com Git - class_modular.git/.git/blobdiff - lib/Class/Modular.pm
* stop using eval to wrap the goto, which is broken in 5.8.4 or thereabouts
[class_modular.git/.git] / lib / Class / Modular.pm
index c3f1c0afb49752dd9947efc0775e335cf59fa481..c532a947e346b16eaec9d2979fc3847e48d4d433 100644 (file)
@@ -72,7 +72,7 @@ use Storable qw(dclone); # Used for deep copying objects
 use Safe; # Use Safe when we are dealing with coderefs
 
 BEGIN{
-     $VERSION = q$0.04SVN$;
+     $VERSION = q$0.05SVN$;
      ($REVISION) = q$LastChangedRevision$ =~ /\$LastChangedRevision:\s+([^\s+])/;
      $DEBUG = 0 unless defined $DEBUG;
      $USE_SAFE = 1 unless defined $USE_SAFE;
@@ -465,9 +465,9 @@ sub AUTOLOAD{
 
      if (exists $self->{$cm}{_methodhash}{$method} and
         defined $self->{$cm}{_methodhash}{$method}{reference}) {
-         eval {
-              no strict 'refs';
-              goto &{$self->{$cm}{_methodhash}{$method}{reference}};
+         {
+             my $method = \&{$self->{$cm}{_methodhash}{$method}{reference}};
+             goto &$method;
          }
      }
      else {