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


NAME

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

Back to Top


SYNOPSIS

  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;

Back to Top


DESCRIPTION

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 the accessors manpage for documentation.

Back to Top


AUTHOR

Steve Purkis <spurkis@cpan.org>

Back to Top


SEE ALSO

the accessors manpage, the accessors::classic manpage, base

Back to Top

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