Class::HasA - Automatically create has-a relationships


Class-HasA documentation  | view source Contained in the Class-HasA distribution.

Index


NAME

Top

Class::HasA - Automatically create has-a relationships

SYNOPSIS

Top

  package Some::Mail::Thing;
  use Class::HasA ( [ qw/from to subject/ ] => "head" );
  # Equivalent:
  #  sub from { shift->head->from(@_) }
  #  sub to   { shift->head->to(@_) }
  #  ...

DESCRIPTION

Top

This module produces methods which encapsulates has-a relationships between objects. For instance, in the example above, a mail message has-a head object, and the from, to and subject methods act "through" the head object.

AUTHOR

Top

Simon Cozens, <simon@kasei.com>

COPYRIGHT AND LICENSE

Top


Class-HasA documentation  | view source Contained in the Class-HasA distribution.