Simon Cozens > Class-HasA > Class::HasA

Download:
Class-HasA-1.00.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
Report a bug
Module Version: 1.00   Source  

NAME ^

Class::HasA - Automatically create has-a relationships

SYNOPSIS ^

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

DESCRIPTION ^

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 ^

Simon Cozens, <simon@kasei.com>

COPYRIGHT AND LICENSE ^

Copyright 2003 by Kasei

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.