Andy Armstrong > like > like

Download:
like-0.02.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  1
Open  0
View/Report Bugs
Module Version: 0.02   Source  

NAME ^

like - Declare support for an interface

VERSION ^

This document describes like version 0.02

SYNOPSIS ^

  package MyThing;

  use like qw( some::interface );

  # later

  if ( MyThing->isa( 'some::interface' ) ) {
    print "Yes it is!\n";
  }

DESCRIPTION ^

Allows a package to declare that it ISA named interface without that interface having to pre-exist.

This

  package MyThing;

  use like qw( some::interface );

is equivalent to

  package some::interface; # make the package exist

  package MyThing;

  use vars qw( @ISA );
  push @ISA, 'some::interface';

The like declaration is intended to declare that your package conforms to some interface without needing to have the consumer of that interface installed.

There is no test that your package really does conform to any interface (see Moose); you're just declaring your intent.

CONFIGURATION AND ENVIRONMENT ^

like requires no configuration files or environment variables.

DEPENDENCIES ^

None.

INCOMPATIBILITIES ^

None reported.

BUGS AND LIMITATIONS ^

Please report any bugs or feature requests to bug-like@rt.cpan.org, or through the web interface at http://rt.cpan.org.

AUTHOR ^

Andy Armstrong <andy@hexten.net>

LICENCE AND COPYRIGHT ^

Copyright (c) 2009, Andy Armstrong <andy@hexten.net>.

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

syntax highlighting: