%PDF- %PDF-
Direktori : /usr/local/perl/default/lib/perl5/site_perl/5.32/SOAP/Lite/ |
Current File : //usr/local/perl/default/lib/perl5/site_perl/5.32/SOAP/Lite/Utils.pm |
package SOAP::Lite::Utils; use strict; our $VERSION = '1.27'; # VERSION sub import { my $caller = caller(); no strict qw(refs); *{ "$caller\::__mk_accessors" } = \&__mk_accessors; } sub __mk_accessors { my ($class, @method_from) = @_; no strict 'refs'; for my $method ( @method_from ) { my $field = '_' . $method; *{ "$class\::$method" } = sub { my $self = ref $_[0] ? shift : shift->new(); if (@_) { $self->{$field} = shift; return $self } return $self->{$field}; } } } 1; __END__