GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
accessors::chained(3) User Contributed Perl Documentation accessors::chained(3)

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

  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;

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.

Steve Purkis <spurkis@cpan.org>

accessors, accessors::classic, base
2022-04-07 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.