Commits

Toby Inkster committed e8546de

Use Object::AUTHORITY instead of UNIVERSAL::AUTHORITY.

Comments (0)

Files changed (3)

lib/authority/shared.pm

 package authority::shared;
 
-use 5.005;
+use 5.006;
 use strict;
-use UNIVERSAL::AUTHORITY 0.002 qw();
+use Object::AUTHORITY 0 qw();
 
 BEGIN {
 	$authority::shared::AUTHORITY = 'cpan:TOBYINK';
-	$authority::shared::VERSION   = '0.003';
+	$authority::shared::VERSION   = '0.004';
 }
 
 use Carp qw(croak);
 		AUTH: for (@authorities)
 		{
 			next AUTH
-				unless UNIVERSAL::AUTHORITY::reasonably_smart_match($_, $test);
+				unless Object::AUTHORITY::reasonably_smart_match($_, $test);
 			$pass = $_;
 			last AUTH;
 		}
  
  package main;
  use feature qw(say);
- say MyApp->AUTHORITY;  # says "cpan:JOE"
+ say scalar MyApp->AUTHORITY;     # says "cpan:JOE"
  MyApp->AUTHORITY('cpan:JOE');    # lives
  MyApp->AUTHORITY('cpan:ALICE');  # lives
  MyApp->AUTHORITY('cpan:BOB');    # lives
 
 =head1 SEE ALSO
 
-L<UNIVERSAL::AUTHORITY>,
-L<authority>,
-L<http://feather.perl6.nl/syn/S11.html>,
+=over
+
+=item * L<Object::AUTHORITY> - an AUTHORITY method for your class
+
+=item * I<authority::shared> (this module) - a more sophisticated AUTHORITY method for your class
+
+=item * L<UNIVERSAL::AUTHORITY> - an AUTHORITY method for every class (deprecated)
+
+=item * L<UNIVERSAL::AUTHORITY::Lexical> - an AUTHORITY method for every class, within a lexical scope
+
+=item * L<authority> - load modules only if they have a particular authority
+
+=back
+
+Background reading: L<http://feather.perl6.nl/syn/S11.html>,
 L<http://www.perlmonks.org/?node_id=694377>.
 
 =head1 AUTHOR
 		dcs:versus dist:v_0-002 ;
 		dcs:item   [ a dcs:Packaging ; rdfs:label "Note dependency on Sub::Name."@en ]
 		] .
+
+dist:project :release dist:v_0-004 .
+dist:v_0-004
+	a               :Version ;
+	dc:issued       "2011-12-01"^^xsd:date ;
+	:revision       "0.004"^^xsd:string ;
+	:file-release   <http://backpan.cpan.org/authors/id/T/TO/TOBYINK/authority-shared-0.004.tar.gz> ;
+	dcs:changeset [
+		dcs:versus dist:v_0-003 ;
+		dcs:item   [ rdfs:label "Don't use UNIVERSAL::AUTHORITY."@en ] ;
+		dcs:item   [ rdfs:label "use Object::AUTHORITY."@en ] ;
+		] .
 	:homepage       <https://metacpan.org/release/authority-shared> ;
 	:download-page  <https://metacpan.org/release/authority-shared> ;
 	:bug-database   <http://rt.cpan.org/Dist/Display.html?Queue=authority-shared> ;
+	:repository     [ a :HgRepository ; :browse <https://bitbucket.org/tobyink/p5-authority-shared> ] ;
 	:created        "2011-11-06"^^xsd:date ;
 	:license        <http://dev.perl.org/licenses/> ;
 	:developer      [ a foaf:Person ; foaf:name "Toby Inkster" ; foaf:mbox <mailto:tobyink@cpan.org> ] .