{"id":28,"date":"2008-12-31T00:56:15","date_gmt":"2008-12-31T05:56:15","guid":{"rendered":"http:\/\/somethingdoug.com\/thoughts\/?p=28"},"modified":"2009-02-17T15:09:08","modified_gmt":"2009-02-17T20:09:08","slug":"our-authority","status":"publish","type":"post","link":"https:\/\/somethingdoug.com\/thoughts\/2008\/12\/31\/our-authority\/","title":{"rendered":"our $AUTHORITY"},"content":{"rendered":"<p>So what is the business with the following global variable I keep seeing in CPAN modules these days?<\/p>\n<pre style=\"padding-left: 30px;\">our $AUTHORITY;<\/pre>\n<p>So I searched a bit to figure it out, and found it made its way from Perl 6. A description of its use in Perl 6 can be found in <a href=\"http:\/\/perlcabal.org\/syn\/S11.html#Versioning\">Synopsis 11: Modules<\/a>. Essentially Perl 6 saw that there would be no reason why there can&#8217;t be more than one module named Foo::Bar. You can already designate a minimum version required of a module, and you still can in Perl 6, but they saw that Foo::Bar is just a short name for the module. Its full name includes more parts, including the authority. So to load up the Foo::Bar I wrote in <a href=\"http:\/\/cpan.org\/\">CPAN<\/a> (note: I have no such module), you would say:<\/p>\n<pre style=\"padding-left: 30px;\">use Foo::Bar:auth&lt;cpan:DOUGDUDE&gt;;<\/pre>\n<p>When in the Foo::Bar module I specify:<\/p>\n<pre style=\"padding-left: 30px;\">our $AUTHORITY = 'cpan:DOUGDUDE';<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>So what is the business with the following global variable I keep seeing in CPAN modules these days? our $AUTHORITY; So I searched a bit to figure it out, and found it made its way from Perl 6. A description of its use in Perl 6 can be found in Synopsis 11: Modules. Essentially Perl [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[12,27,17],"class_list":["post-28","post","type-post","status-publish","format-standard","hentry","category-perl","tag-cpan","tag-perl","tag-perl6"],"_links":{"self":[{"href":"https:\/\/somethingdoug.com\/thoughts\/wp-json\/wp\/v2\/posts\/28","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/somethingdoug.com\/thoughts\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/somethingdoug.com\/thoughts\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/somethingdoug.com\/thoughts\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/somethingdoug.com\/thoughts\/wp-json\/wp\/v2\/comments?post=28"}],"version-history":[{"count":2,"href":"https:\/\/somethingdoug.com\/thoughts\/wp-json\/wp\/v2\/posts\/28\/revisions"}],"predecessor-version":[{"id":34,"href":"https:\/\/somethingdoug.com\/thoughts\/wp-json\/wp\/v2\/posts\/28\/revisions\/34"}],"wp:attachment":[{"href":"https:\/\/somethingdoug.com\/thoughts\/wp-json\/wp\/v2\/media?parent=28"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/somethingdoug.com\/thoughts\/wp-json\/wp\/v2\/categories?post=28"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/somethingdoug.com\/thoughts\/wp-json\/wp\/v2\/tags?post=28"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}