From: Matt S Trout Date: Wed, 17 Nov 2010 08:06:33 +0000 (+0000) Subject: add rationale section X-Git-Tag: 0.009002~1 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=5d5bb71d96bad0fb8d1d7542d94fa89122a46f12;p=gitmo%2FRole-Tiny.git add rationale section --- diff --git a/Changes b/Changes index 98e43f5..918545b 100644 --- a/Changes +++ b/Changes @@ -1,3 +1,4 @@ + - Add explanation of Moo's existence - Change @ISA setting mechanism to deal with a big in 5.10.0's get_linear_isa - Change 5.10 checks to >= to not try and load MRO::Compat on 5.10.0 - Make 'perl -Moo' DTRT diff --git a/lib/Moo.pm b/lib/Moo.pm index 7d93ea9..ae3277e 100644 --- a/lib/Moo.pm +++ b/lib/Moo.pm @@ -146,6 +146,26 @@ thirds of L. Unlike C this module does not aim at full L compatibility. See L for more details. +=head1 WHY MOO EXISTS + +If you want a full object system with a rich Metaprotocol, L is +already wonderful. + +I've tried several times to use L but it's 3x the size of Moo and +takes longer to load than most of my Moo based CGI scripts take to run. + +If you don't want L, you don't want "less metaprotocol" like L, +you want "as little as possible" - which means "no metaprotocol", which is +what Moo provides. + +By Moo 1.0 I intend to have Moo's equivalent of L built in - +if Moose gets loaded, any Moo class or role will act as a Moose equivalent +if treated as such. + +Hence - Moo exists as its name - Minimal Object Orientation - with a pledge +to make it smooth to upgrade to L when you need more than minimal +features. + =head1 IMPORTED METHODS =head2 new diff --git a/maint/bump-version b/maint/bump-version index 26de88b..8aa9e53 100755 --- a/maint/bump-version +++ b/maint/bump-version @@ -1,6 +1,5 @@ #!/usr/bin/env perl -use 5.010; use strict; use warnings FATAL => 'all'; use autodie; @@ -13,9 +12,10 @@ my $OLD_DECIMAL = sprintf('%i.%03i%03i', @parts); my %bump_part = (major => 0, minor => 1, bugfix => 2); -my $bump_this = - $bump_part{$ARGV[0]||'bugfix'} - // die "no idea which part to bump - $ARGV[0] means nothing to me"; +my $bump_this = $bump_part{$ARGV[0]||'bugfix'}; + +die "no idea which part to bump - $ARGV[0] means nothing to me" + unless defined($bump_this); my @new_parts = @parts; @@ -25,7 +25,7 @@ my $NEW_DECIMAL = sprintf('%i.%03i%03i', @new_parts); warn "Bumping $OLD_DECIMAL -> $NEW_DECIMAL\n"; -my $PM_FILE = 'lib/Module/Metadata.pm'; +my $PM_FILE = 'lib/Moo.pm'; my $file = do { local (@ARGV, $/) = ($PM_FILE); <> };