Class-Accessor-Grouped

 view release on metacpan or  search on metacpan

lib/Class/Accessor/Grouped.pm  view on Meta::CPAN


        my $fq_name = "${current_class}::${methname}";
        *$fq_name = Sub::Name::subname($fq_name, $resolved_implementation);
      }

      # now things are installed - one ref less to carry
      delete $resolved_methods->{$current_class}{$methname};

      # but need to record it in the expectation registry *in case* it
      # was cached via ->can for some moronic reason
      Scalar::Util::weaken( $cag_produced_crefs->{$resolved_implementation} = $resolved_implementation );


      # older perls segfault if the cref behind the goto throws
      # http://rt.perl.org/rt3/Public/Bug/Display.html?id=35878
      return $resolved_implementation->(@_) if __CAG_ENV__::BROKEN_GOTO;

      goto $resolved_implementation;
    };

    Scalar::Util::weaken($cag_produced_crefs->{$ret} = $ret);

    $ret; # returning shim
  }

  # no Sub::Name - just install the coderefs directly (compiling every time)
  elsif (__CAG_ENV__::NO_SUBNAME) {
    my $src = $accessor_maker_cache->{source}{$type}{$group}{$field} ||=
      $maker_templates->{$type}{pp_generator}->($group, $field);

    $cag_eval->(



( run in 0.328 second using v1.01-cache-2.11-cpan-65fba6d93b7 )