morgon has asked for the wisdom of the Perl Monks concerning the following question:
Hi
I have seen in many places a coding convention that looks like this:
package MooseX::Types::TypeDecorator; { $MooseX::Types::TypeDecorator::VERSION = '0.35'; } use strict; use warnings; # and so on
I assume that the author wants to have the version number in a prominent place and so is willing to put one line to trivial code outside of strict but what is the point of putting the assignment to a package variable into an extra block?
Why not simply
Is that just personal taste or is there something to it that I miss?package MooseX::Types::TypeDecorator; use strict; use warnings; $MooseX::Types::TypeDecorator::VERSION = '0.35';
I just wonder...
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: What is the point of this coding style?
by tobyink (Canon) on Nov 20, 2013 at 08:10 UTC | |
Re: What is the point of this coding style?
by moritz (Cardinal) on Nov 20, 2013 at 06:27 UTC | |
Re: What is the point of this coding style? (pause indexer/dzil)
by Anonymous Monk on Nov 20, 2013 at 08:16 UTC |
Back to
Seekers of Perl Wisdom