like - Declare support for an interface
This document describes like version 0.02
package MyThing; use like qw( some::interface ); # later if ( MyThing->isa( 'some::interface' ) ) { print "Yes it is!\n"; }
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.
like requires no configuration files or environment variables.
None.
None reported.
Please report any bugs or feature requests to bug-like@rt.cpan.org, or through the web interface at http://rt.cpan.org.
bug-like@rt.cpan.org
Andy Armstrong <andy@hexten.net>
<andy@hexten.net>
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.
To install like, copy and paste the appropriate command in to your terminal.
cpanm
cpanm like
CPAN shell
perl -MCPAN -e shell install like
For more information on module installation, please visit the detailed CPAN module installation guide.