Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: What is the point of this coding style?

by tobyink (Abbot)
on Nov 20, 2013 at 08:10 UTC ( #1063484=note: print w/ replies, xml ) Need Help??


in reply to What is the point of this coding style?

MooseX-Types is managed using Dist::Zilla which rewrites some of the source code when it gets published. In the MooseX-Types repository on Github, there is no $VERSION defined at all; this is added when it gets published. When Dist::Zilla adds $VERSION lines it always does so right underneath the package statement, thus it ends up above the use strict line.

I'm not quite sure of the reason for the block. Possibly Dist::Zilla has a policy of wrapping any inserted code in a block to prevent lexical leakage; in this case there would not be any leakage anyway, but perhaps such a policy is automatically applied to all inserted code.

use Moops; class Cow :rw { has name => (default => 'Ermintrude') }; say Cow->new->name


Comment on Re: What is the point of this coding style?
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1063484]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (10)
As of 2014-07-23 23:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (154 votes), past polls