accessors::chained - create method chaining accessors in caller's package.


accessors documentation Contained in the accessors distribution.

Index


Code Index:

NAME

Top

accessors::chained - create method chaining accessors in caller's package.

SYNOPSIS

Top

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

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

  # generates chaining accessors:
  $obj->foo( 'hello ' )
      ->bar( 'world' )
      ->baz( "!\n" );

  print $obj->foo, $obj->bar, $obj->baz;

DESCRIPTION

Top

The accessors::chained pragma lets you create simple method-chaining accessors at compile-time.

This module exists for future backwards-compatability - if the default style of accessor ever changes, method-chaining accessors will still be available through this pragma.

See accessors for documentation.

AUTHOR

Top

Steve Purkis <spurkis@cpan.org>

SEE ALSO

Top

accessors, accessors::classic, base


accessors documentation Contained in the accessors distribution.
package accessors::chained;

use strict;
use warnings::register;
use base qw( accessors );

our $VERSION  = '1.01';
our $REVISION = (split(/ /, ' $Revision: 1.3 $ '))[2];

# inherit everything for now.

1;

__END__