Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

our $AUTHORITY

by friedo (Prior)
on Jun 27, 2008 at 15:07 UTC ( [id://694377]=perlquestion: print w/replies, xml ) Need Help??

friedo has asked for the wisdom of the Perl Monks concerning the following question:

Greetings.

I've been learning a lot about Moose lately and reading chunks of the code (always a dangerous idea.) I noticed that a lot of stvn's modules contain the line

our $AUTHORITY = 'cpan:STEVAN';
after the usual $VERSION line.

Is this $AUTHORITY variable actually used for anything on CPAN or by CPAN.pm? What does it do? Or is stvn just a crazy madman? (I'm inclined to believe these options are not mutually exclusive. :) )

Replies are listed 'Best First'.
Re: our $AUTHORITY
by dragonchild (Archbishop) on Jun 27, 2008 at 15:37 UTC
    Yes, stvn is a madman.

    Oh, and yes, AUTHORITY will be used in future versions of CPAN and definitely in C6PAN.


    My criteria for good software:
    1. Does it work?
    2. Can someone else come in, make a change, and be reasonably certain no bugs were introduced?
      I don't think we've settled on C6PAN , as opposed to CP6AN?
        I thought we had settled that I can't type.

        My criteria for good software:
        1. Does it work?
        2. Can someone else come in, make a change, and be reasonably certain no bugs were introduced?

        Yeah, I like the name CP6AN.

Re: our $AUTHORITY
by moritz (Cardinal) on Jun 27, 2008 at 15:30 UTC
    I don' think it's used in CPAN.pm (though I might be wrong), but I know that Perl 6 uses the "authority" trait (?) on modules, because it permits multiple modules of the name.

    Actually Perl 6 has a long or full module name, which includes the short name, the version and the authority.

    There's no reason why only one developer in this whole wild world should be allowed to chose the wonderful name Foo for a module, and there's no reason why you shouldn't be able to use two different Foo modules at the same time in your program, just because they happen to have the same short name.

    See S11: Versioning for details

Re: our $AUTHORITY
by stvn (Monsignor) on Jun 29, 2008 at 19:08 UTC
    Or is stvn just a crazy madman?

    Yes. Although if I were truely crazy I wouldn't know I am crazy. So, I guess I should say "No". Wait, I am confused now.

    Is this $AUTHORITY variable actually used for anything on CPAN or by CPAN.pm?

    Class::MOP::Module adds introspection support for it, but mostly it was a throwback to my work on Pugs and the Perl6::MetaModel. If someone decides to use it in CPAN.pm,or someone decides to write a module to differentiate between Moose-cpan:STEVAN and Moose-cpan:FRIEDO that would be awesome. But from what I have seen that is difficult to do with Perl, possibly verging on impossible, so I am not holding my breath. However, when someone crazier then I figures it out, I know my CPAN modules will be ready... will yours?!?!?

    :P

    -stvn

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://694377]
Approved by toolic
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (7)
As of 2024-03-28 11:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found