Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
accessors::rw(3)      User Contributed Perl Documentation     accessors::rw(3)

NAME
       accessors::rw - create 'classic'	read/write accessor methods in
       caller's	package.

SYNOPSIS
	 package Foo;
	 use accessors::rw qw( foo bar baz );

	 my $obj = bless {}, 'Foo';

	 # always return the current value, even on set:
	 $obj->foo( 'hello ' ) if $obj->bar( 'world' ) eq 'world';

	 print $obj->foo, $obj->bar, $obj->baz(	"!\n" );

DESCRIPTION
       The accessors::rw pragma	lets you create	simple classic read/write
       accessors at compile-time.  It is an alias for accessors::classic.

AUTHOR
       Steve Purkis <spurkis@cpan.org>.

SEE ALSO
       accessors, accessors::ro, accessors::classic, accessors::chained, base

perl v5.24.1			  2017-07-02		      accessors::rw(3)

NAME | SYNOPSIS | DESCRIPTION | AUTHOR | SEE ALSO

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=accessors::rw&sektion=3&manpath=FreeBSD+12.0-RELEASE+and+Ports>

home | help