Sha256: c6125fe9e3751fa129b493080559a62b0f3e5ef40244a0be192b6d4f54c23d01

Contents?: true

Size: 877 Bytes

Versions: 6

Compression:

Stored size: 877 Bytes

Contents

package LWP::MemberMixin;

our $VERSION = '6.67';

sub _elem {
    my $self = shift;
    my $elem = shift;
    my $old  = $self->{$elem};
    $self->{$elem} = shift if @_;
    return $old;
}

1;

__END__

=pod

=head1 NAME

LWP::MemberMixin - Member access mixin class

=head1 SYNOPSIS

 package Foo;
 use parent qw(LWP::MemberMixin);

=head1 DESCRIPTION

A mixin class to get methods that provide easy access to member
variables in the C<%$self>.
Ideally there should be better Perl language support for this.

=head1 METHODS

There is only one method provided:

=head2 _elem

    _elem($elem [, $val])

Internal method to get/set the value of member variable
C<$elem>. If C<$val> is present it is used as the new value
for the member variable.  If it is not present the current
value is not touched. In both cases the previous value of
the member variable is returned.

=cut

Version data entries

6 entries across 3 versions & 1 rubygems

Version Path
javonet-ruby-sdk-2.0.4 lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/deps/lib/perl5/LWP/MemberMixin.pm
javonet-ruby-sdk-2.0.4 lib/javonet-ruby-sdk/Binaries/Perl/MacOs/X64/deps/lib/perl5/LWP/MemberMixin.pm
javonet-ruby-sdk-2.0.1 lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/deps/lib/perl5/LWP/MemberMixin.pm
javonet-ruby-sdk-2.0.1 lib/javonet-ruby-sdk/Binaries/Perl/MacOs/X64/deps/lib/perl5/LWP/MemberMixin.pm
javonet-ruby-sdk-2.0.0 lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/deps/lib/perl5/LWP/MemberMixin.pm
javonet-ruby-sdk-2.0.0 lib/javonet-ruby-sdk/Binaries/Perl/MacOs/X64/deps/lib/perl5/LWP/MemberMixin.pm