accessors::chained(3pm)

accessors::chained3pm

Create method chaining accessors in caller's package.

Usage

  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;

Overview

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.

Releases

7 releases since Debian 7 (Wheezy); the text changed 3 times.

  1. 7–8
  2. 9–10
  3. 11
  4. 12–13

Author

Steve Purkis <[email protected]>

From libaccessors-perl 1.01-4 in Debian 13 (Trixie). Parsed by carta from the page's man source.