Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid

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

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1063484]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (5)
As of 2017-12-16 11:39 GMT
Find Nodes?
    Voting Booth?
    What programming language do you hate the most?

    Results (450 votes). Check out past polls.