Changeset 8743
- Timestamp:
- 04/03/08 16:16:40 (8 months ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
lang/perl/HTTP-MobileAttribute/trunk/lib/HTTP/MobileAttribute/Plugin.pm
r8740 r8743 6 6 sub mk_register_accessors { 7 7 my $self = shift; 8 return if $self->{__method_registerd}; 8 9 my $carrier = shift; 9 10 my $class = ref $self; … … 12 13 for my $method (@_) { 13 14 no strict 'refs'; 14 *{"$class\::$method"} = sub { shift->{$method} } unless *{"$class\::$method"}{CODE};15 *{"$class\::$method"} = sub { shift->{$method} }; 15 16 $pkg->register_method( $method => $self ); 16 17 } 18 $self->{__method_registerd} = 1; 17 19 } 18 20 … … 20 22 my($self, $c) = @_; 21 23 for my $key (keys %{ $self }) { 22 delete $self->{$key} unless $key eq 'config' ;24 delete $self->{$key} unless $key eq 'config' || $key eq '__method_registerd'; 23 25 } 24 26 }
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)