Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

authority::shared(3pm) [debian man page]

authority::shared(3pm)					User Contributed Perl Documentation				    authority::shared(3pm)

NAME
authority::shared - a multi-AUTHORITY method for your classes SYNOPSIS
package MyApp; BEGIN { $MyApp::AUTHORITY = 'cpan:JOE'; } use authority::shared qw(cpan:ALICE cpan:BOB); package main; use feature qw(say); say scalar MyApp->AUTHORITY; # says "cpan:JOE" MyApp->AUTHORITY('cpan:JOE'); # lives MyApp->AUTHORITY('cpan:ALICE'); # lives MyApp->AUTHORITY('cpan:BOB'); # lives MyApp->AUTHORITY('cpan:CAROL'); # croaks DESCRIPTION
This module allows you to indicate that your module is issued by multiple authorities. The package variable $AUTHORITY should still be used to indicate the primary authority for the package. This module does two simple things: 1. Creates an @AUTHORITIES array in the caller package, populating it with the arguments passed to "authority::shared" on the "use" line. 2. Exports an AUTHORITY function to your package that reads the $AUTHORITY and @AUTHORITIES package variables. The main use case for shared authorities is for team projects. The team would designate a URI to represent the team as a whole. For example, "http://datetime.perl.org/", "http://moose.iinteractive.com/" or "http://www.perlrdf.org/". Releases can then be officially stamped with the authority of the team using: use authority::shared q<http://www.perlrdf.org/>; And users can check they have an module released by the official team using: RDF::TakeOverTheWorld->AUTHORITY(q<http://www.perlrdf.org/>); which will croak if package RDF::TakeOverTheWorld doesn't have the specified authority. BUGS
An obvious limitation is that this module relies on honesty. Don't release modules under authorities you have no authority to use. Please report any bugs to http://rt.cpan.org/Dist/Display.html?Queue=authority-shared <http://rt.cpan.org/Dist/Display.html?Queue=authority-shared>. SEE ALSO
o Object::AUTHORITY - an AUTHORITY method for your class o authority::shared (this module) - a more sophisticated AUTHORITY method for your class o UNIVERSAL::AUTHORITY - an AUTHORITY method for every class (deprecated) o UNIVERSAL::AUTHORITY::Lexical - an AUTHORITY method for every class, within a lexical scope o authority - load modules only if they have a particular authority Background reading: <http://feather.perl6.nl/syn/S11.html>, <http://www.perlmonks.org/?node_id=694377>. AUTHOR
Toby Inkster <tobyink@cpan.org>. COPYRIGHT AND LICENCE
This software is copyright (c) 2011 by Toby Inkster. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. DISCLAIMER OF WARRANTIES
THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. perl v5.14.2 2011-12-15 authority::shared(3pm)

Check Out this Related Man Page

Class::MOP::Module(3)					User Contributed Perl Documentation				     Class::MOP::Module(3)

NAME
Class::MOP::Module - Module Meta Object VERSION
version 2.1202 DESCRIPTION
A module is essentially a Class::MOP::Package with metadata, in our case the version and authority. INHERITANCE
Class::MOP::Module is a subclass of Class::MOP::Package. METHODS
Class::MOP::Module->create($package, %options) Overrides "create" from Class::MOP::Package to provide these additional options: "version" A version number, to be installed in the $VERSION package global variable. "authority" An authority, to be installed in the $AUTHORITY package global variable. $metamodule->version This is a read-only attribute which returns the $VERSION of the package, if one exists. $metamodule->authority This is a read-only attribute which returns the $AUTHORITY of the package, if one exists. $metamodule->identifier This constructs a string which combines the name, version and authority. Class::MOP::Module->meta This will return a Class::MOP::Class instance for this class. AUTHORS
o Stevan Little <stevan.little@iinteractive.com> o Dave Rolsky <autarch@urth.org> o Jesse Luehrs <doy@tozt.net> o Shawn M Moore <code@sartak.org> o XXXX XXX'XX (Yuval Kogman) <nothingmuch@woobling.org> o Karen Etheridge <ether@cpan.org> o Florian Ragwitz <rafl@debian.org> o Hans Dieter Pearcey <hdp@weftsoar.net> o Chris Prather <chris@prather.org> o Matt S Trout <mst@shadowcat.co.uk> COPYRIGHT AND LICENSE
This software is copyright (c) 2006 by Infinity Interactive, Inc.. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. perl v5.18.2 2014-01-19 Class::MOP::Module(3)
Man Page