From: Dave Rolsky Date: Wed, 7 Sep 2011 15:10:08 +0000 (-0500) Subject: Remove all trailing whitespace X-Git-Tag: 2.0300~73 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=064a13a3104c7c38981bdc571b130da00b59945a;p=gitmo%2FMoose.git Remove all trailing whitespace Some packages still had a NAME header in the pod, instead of an ABSTRACT comment --- diff --git a/benchmarks/cmop/lib/MOP/Immutable/Point.pm b/benchmarks/cmop/lib/MOP/Immutable/Point.pm index d19d3a9..a0d7c90 100644 --- a/benchmarks/cmop/lib/MOP/Immutable/Point.pm +++ b/benchmarks/cmop/lib/MOP/Immutable/Point.pm @@ -11,7 +11,7 @@ __PACKAGE__->meta->add_attribute('y' => (accessor => 'y')); sub clear { my $self = shift; $self->x(0); - $self->y(0); + $self->y(0); } __PACKAGE__->meta->make_immutable; diff --git a/benchmarks/cmop/lib/MOP/Immutable/Point3D.pm b/benchmarks/cmop/lib/MOP/Immutable/Point3D.pm index 5c9f9fb..bf33cf0 100644 --- a/benchmarks/cmop/lib/MOP/Immutable/Point3D.pm +++ b/benchmarks/cmop/lib/MOP/Immutable/Point3D.pm @@ -12,11 +12,11 @@ __PACKAGE__->meta->add_attribute('z' => (accessor => 'z')); sub clear { my $self = shift; $self->SUPER::clear(); - $self->z(0); + $self->z(0); } __PACKAGE__->meta->make_immutable; 1; -__END__ \ No newline at end of file +__END__ diff --git a/benchmarks/cmop/lib/MOP/Installed/Point.pm b/benchmarks/cmop/lib/MOP/Installed/Point.pm index 4ad669a..9b6e6cf 100644 --- a/benchmarks/cmop/lib/MOP/Installed/Point.pm +++ b/benchmarks/cmop/lib/MOP/Installed/Point.pm @@ -18,9 +18,9 @@ sub new { sub clear { my $self = shift; $self->x(0); - $self->y(0); + $self->y(0); } 1; -__END__ \ No newline at end of file +__END__ diff --git a/benchmarks/cmop/lib/MOP/Installed/Point3D.pm b/benchmarks/cmop/lib/MOP/Installed/Point3D.pm index 1a8bf03..e1b66f3 100644 --- a/benchmarks/cmop/lib/MOP/Installed/Point3D.pm +++ b/benchmarks/cmop/lib/MOP/Installed/Point3D.pm @@ -14,9 +14,9 @@ __PACKAGE__->meta->add_attribute('z' => (accessor => 'z')); sub clear { my $self = shift; $self->SUPER::clear(); - $self->z(0); + $self->z(0); } 1; -__END__ \ No newline at end of file +__END__ diff --git a/benchmarks/cmop/lib/MOP/Point.pm b/benchmarks/cmop/lib/MOP/Point.pm index b07b8fd..12160f7 100644 --- a/benchmarks/cmop/lib/MOP/Point.pm +++ b/benchmarks/cmop/lib/MOP/Point.pm @@ -16,9 +16,9 @@ sub new { sub clear { my $self = shift; $self->x(0); - $self->y(0); + $self->y(0); } 1; -__END__ \ No newline at end of file +__END__ diff --git a/benchmarks/cmop/lib/MOP/Point3D.pm b/benchmarks/cmop/lib/MOP/Point3D.pm index 2bd544d..0287499 100644 --- a/benchmarks/cmop/lib/MOP/Point3D.pm +++ b/benchmarks/cmop/lib/MOP/Point3D.pm @@ -12,9 +12,9 @@ __PACKAGE__->meta->add_attribute('z' => (accessor => 'z')); sub clear { my $self = shift; $self->SUPER::clear(); - $self->z(0); + $self->z(0); } 1; -__END__ \ No newline at end of file +__END__ diff --git a/benchmarks/cmop/lib/Plain/Point.pm b/benchmarks/cmop/lib/Plain/Point.pm index fca27b0..432d194 100644 --- a/benchmarks/cmop/lib/Plain/Point.pm +++ b/benchmarks/cmop/lib/Plain/Point.pm @@ -7,7 +7,7 @@ use warnings; sub new { my ( $class, %params ) = @_; - + return bless { x => $params{x} || 10, y => $params{y}, diff --git a/eg/class_browser.pl b/eg/class_browser.pl index 095234d..f98fb39 100644 --- a/eg/class_browser.pl +++ b/eg/class_browser.pl @@ -21,8 +21,8 @@ if ($stand_alone) { Class::MOP::Browser::Server; our @ISA = qw(HTTP::Server::Simple::CGI); sub handle_request { ::process_template() } - } - Class::MOP::Browser::Server->new()->run(); + } + Class::MOP::Browser::Server->new()->run(); } else { print CGI::header(); @@ -41,16 +41,16 @@ else { 'deparse_method' => \&::deparse_method, 'deparse_item' => \&::deparse_item, } - ) or warn Template->error; + ) or warn Template->error; } } -sub get_all_metaclasses { - sort { $a->name cmp $b->name } Class::MOP::get_all_metaclass_instances() +sub get_all_metaclasses { + sort { $a->name cmp $b->name } Class::MOP::get_all_metaclass_instances() } - -sub get_metaclass_by_name { - Class::MOP::get_metaclass_by_name(@_); + +sub get_metaclass_by_name { + Class::MOP::get_metaclass_by_name(@_); } sub deparse_method { @@ -65,9 +65,9 @@ sub deparse_item { return $item unless ref $item; local $Data::Dumper::Deparse = 1; local $Data::Dumper::Indent = 1; - my $dumped = Dumper $item; + my $dumped = Dumper $item; $dumped =~ s/^\$VAR1\s=\s//; - $dumped =~ s/\;$//; + $dumped =~ s/\;$//; return _clean_deparse_code($dumped); } @@ -76,11 +76,11 @@ sub _clean_deparse_code { my @cleaned; foreach (@body) { next if /^\s+use/; - next if /^\s+BEGIN/; - next if /^\s+package/; + next if /^\s+BEGIN/; + next if /^\s+package/; push @cleaned => $_; - } - return (join "\n" => @cleaned); + } + return (join "\n" => @cleaned); } 1; @@ -116,52 +116,52 @@ pre { border: 1px dotted green; } -A { +A { font-family: arial; - font-size: 12px; + font-size: 12px; color: black; text-decoration: none; } A:hover { - text-decoration: underline; + text-decoration: underline; } - -td.lightblue { - background-color: #99BBFF; - border-right: 1px solid #336699; - border-bottom: 1px solid #336699; - border-top: 1px solid #BBDDFF; - border-left: 1px solid #BBDDFF; + +td.lightblue { + background-color: #99BBFF; + border-right: 1px solid #336699; + border-bottom: 1px solid #336699; + border-top: 1px solid #BBDDFF; + border-left: 1px solid #BBDDFF; } -td.grey { - background-color: #CCCCCC; - border-right: 1px solid #888888; - border-bottom: 1px solid #888888; - border-top: 1px solid #DDDDDD; - border-left: 1px solid #DDDDDD; +td.grey { + background-color: #CCCCCC; + border-right: 1px solid #888888; + border-bottom: 1px solid #888888; + border-top: 1px solid #DDDDDD; + border-left: 1px solid #DDDDDD; } -td.manila { +td.manila { background-color: #FFDD99; - border-right: 2px solid #CC9933; - border-bottom: 2px solid #CC9933; - border-top: 2px solid #FFFFBB; - border-left: 2px solid #FFFFBB; + border-right: 2px solid #CC9933; + border-bottom: 2px solid #CC9933; + border-top: 2px solid #FFFFBB; + border-left: 2px solid #FFFFBB; } -td.darkgreen { - background-color: #33CC33; - border-right: 1px solid #009900; - border-bottom: 1px solid #009900; - color: #CCFFCC; +td.darkgreen { + background-color: #33CC33; + border-right: 1px solid #009900; + border-bottom: 1px solid #009900; + color: #CCFFCC; } -td.lightgreen { - background-color: #AAFFAA; - border-right: 1px solid #33FF33; - border-bottom: 1px solid #33FF33; +td.lightgreen { + background-color: #AAFFAA; + border-right: 1px solid #33FF33; + border-bottom: 1px solid #33FF33; } @@ -170,7 +170,7 @@ td.lightgreen {

Class::MOP Browser

- + [% END %] diff --git a/lib/Class/MOP/Attribute.pm b/lib/Class/MOP/Attribute.pm index 309eadb..3abf4a9 100644 --- a/lib/Class/MOP/Attribute.pm +++ b/lib/Class/MOP/Attribute.pm @@ -110,26 +110,26 @@ sub initialize_instance_slot { # attribute's default value (if it has one) if(defined $init_arg and exists $params->{$init_arg}){ $self->_set_initial_slot_value( - $meta_instance, + $meta_instance, $instance, $params->{$init_arg}, ); - } + } elsif (exists $self->{'default'}) { $self->_set_initial_slot_value( - $meta_instance, + $meta_instance, $instance, $self->default($instance), ); - } + } elsif (defined( my $builder = $self->{'builder'})) { if ($builder = $instance->can($builder)) { $self->_set_initial_slot_value( - $meta_instance, + $meta_instance, $instance, $instance->$builder, ); - } + } else { confess(ref($instance)." does not support builder method '". $self->{'builder'} ."' for attribute '" . $self->name . "'"); } @@ -163,8 +163,8 @@ sub _make_initializer_writer_callback { }; } -sub get_read_method { - my $self = shift; +sub get_read_method { + my $self = shift; my $reader = $self->reader || $self->accessor; # normal case ... return $reader unless ref $reader; @@ -173,19 +173,19 @@ sub get_read_method { return $name; } -sub get_write_method { +sub get_write_method { my $self = shift; - my $writer = $self->writer || $self->accessor; + my $writer = $self->writer || $self->accessor; # normal case ... return $writer unless ref $writer; # the HASH ref case my ($name) = %$writer; - return $name; + return $name; } sub get_read_method_ref { my $self = shift; - if ((my $reader = $self->get_read_method) && $self->associated_class) { + if ((my $reader = $self->get_read_method) && $self->associated_class) { return $self->associated_class->get_method($reader); } else { @@ -204,8 +204,8 @@ sub get_read_method_ref { } sub get_write_method_ref { - my $self = shift; - if ((my $writer = $self->get_write_method) && $self->associated_class) { + my $self = shift; + if ((my $writer = $self->get_write_method) && $self->associated_class) { return $self->associated_class->get_method($writer); } else { diff --git a/lib/Class/MOP/Class.pm b/lib/Class/MOP/Class.pm index 365d3af..53ab4a8 100644 --- a/lib/Class/MOP/Class.pm +++ b/lib/Class/MOP/Class.pm @@ -27,7 +27,7 @@ sub initialize { my $class = shift; my $package_name; - + if ( @_ % 2 ) { $package_name = shift; } else { @@ -102,7 +102,7 @@ sub _construct_class_instance { } # and check the metaclass compatibility - $meta->_check_metaclass_compatibility(); + $meta->_check_metaclass_compatibility(); Class::MOP::store_metaclass_by_name($package_name, $meta); @@ -716,7 +716,7 @@ sub get_meta_instance { sub _create_meta_instance { my $self = shift; - + my $instance = $self->instance_metaclass->new( associated_metaclass => $self, attributes => [ $self->get_all_attributes() ], @@ -997,18 +997,18 @@ sub class_precedence_list { my $self = shift; my $name = $self->name; - unless (Class::MOP::IS_RUNNING_ON_5_10()) { + unless (Class::MOP::IS_RUNNING_ON_5_10()) { # NOTE: # We need to check for circular inheritance here - # if we are are not on 5.10, cause 5.8 detects it - # late. This will do nothing if all is well, and + # if we are are not on 5.10, cause 5.8 detects it + # late. This will do nothing if all is well, and # blow up otherwise. Yes, it's an ugly hack, better - # suggestions are welcome. + # suggestions are welcome. # - SL - ($name || return)->isa('This is a test for circular inheritance') + ($name || return)->isa('This is a test for circular inheritance') } - # if our mro is c3, we can + # if our mro is c3, we can # just grab the linear_isa if (mro::get_mro($name) eq 'c3') { return @{ mro::get_linear_isa($name) } @@ -1016,7 +1016,7 @@ sub class_precedence_list { else { # NOTE: # we can't grab the linear_isa for dfs - # since it has all the duplicates + # since it has all the duplicates # already removed. return ( $name, diff --git a/lib/Class/MOP/Deprecated.pm b/lib/Class/MOP/Deprecated.pm index a2a34e0..26e42c7 100644 --- a/lib/Class/MOP/Deprecated.pm +++ b/lib/Class/MOP/Deprecated.pm @@ -8,14 +8,12 @@ use Package::DeprecationManager -deprecations => { 1; +# ABSTRACT: Manages deprecation warnings for Class::MOP + __END__ =pod -=head1 NAME - -Class::MOP::Deprecated - Manages deprecation warnings for Class::MOP - =head1 DESCRIPTION use Class::MOP::Deprecated -api_version => $version; diff --git a/lib/Class/MOP/Method/Generated.pm b/lib/Class/MOP/Method/Generated.pm index f8528bb..de55646 100644 --- a/lib/Class/MOP/Method/Generated.pm +++ b/lib/Class/MOP/Method/Generated.pm @@ -63,14 +63,12 @@ sub _compile_code { 1; +# ABSTRACT: Abstract base class for generated methods + __END__ =pod -=head1 NAME - -Class::MOP::Method::Generated - Abstract base class for generated methods - =head1 DESCRIPTION This is a C subclass which is subclassed by diff --git a/lib/Class/MOP/MiniTrait.pm b/lib/Class/MOP/MiniTrait.pm index 52c40bc..5b91c21 100644 --- a/lib/Class/MOP/MiniTrait.pm +++ b/lib/Class/MOP/MiniTrait.pm @@ -33,14 +33,12 @@ require Class::MOP; 1; +# ABSTRACT: Extremely limited trait application + __END__ =pod -=head1 NAME - -Class::MOP::MiniTrait - Extremely limited trait application - =head1 DESCRIPTION This package provides a single function, C, which does a half-assed job diff --git a/lib/Class/MOP/Module.pm b/lib/Class/MOP/Module.pm index c1a813c..3290655 100644 --- a/lib/Class/MOP/Module.pm +++ b/lib/Class/MOP/Module.pm @@ -29,12 +29,12 @@ sub _new { } => $class; } -sub version { +sub version { my $self = shift; ${$self->get_or_add_package_symbol('$VERSION')}; } -sub authority { +sub authority { my $self = shift; ${$self->get_or_add_package_symbol('$AUTHORITY')}; } @@ -90,10 +90,6 @@ __END__ =pod -=head1 NAME - -Class::MOP::Module - Module Meta Object - =head1 DESCRIPTION A module is essentially a L with metadata, in our diff --git a/lib/Class/MOP/Object.pm b/lib/Class/MOP/Object.pm index c2b90bb..9a0cdf7 100644 --- a/lib/Class/MOP/Object.pm +++ b/lib/Class/MOP/Object.pm @@ -9,7 +9,7 @@ use Scalar::Util 'blessed'; # introspection -sub meta { +sub meta { require Class::MOP::Class; Class::MOP::Class->initialize(blessed($_[0]) || $_[0]); } @@ -19,15 +19,15 @@ sub _new { } # RANT: -# Cmon, how many times have you written +# Cmon, how many times have you written # the following code while debugging: -# -# use Data::Dumper; +# +# use Data::Dumper; # warn Dumper $obj; # -# It can get seriously annoying, so why +# It can get seriously annoying, so why # not just do this ... -sub dump { +sub dump { my $self = shift; require Data::Dumper; local $Data::Dumper::Maxdepth = shift || 1; @@ -93,14 +93,12 @@ sub _get_compatible_metaclass_by_subclassing { 1; +# ABSTRACT: Base class for metaclasses + __END__ =pod -=head1 NAME - -Class::MOP::Object - Base class for metaclasses - =head1 DESCRIPTION This class is a very minimal base class for metaclasses. diff --git a/lib/Class/MOP/Package.pm b/lib/Class/MOP/Package.pm index 062706f..a7b75bf 100644 --- a/lib/Class/MOP/Package.pm +++ b/lib/Class/MOP/Package.pm @@ -22,8 +22,7 @@ sub initialize { my $package_name = delete $options{package}; - # we hand-construct the class - # until we can bootstrap it + # we hand-construct the class until we can bootstrap it if ( my $meta = Class::MOP::get_metaclass_by_name($package_name) ) { return $meta; } else { @@ -187,7 +186,7 @@ sub _new { # Attributes # NOTE: -# all these attribute readers will be bootstrapped +# all these attribute readers will be bootstrapped # away in the Class::MOP bootstrap section sub _package_stash { diff --git a/lib/Moose/Deprecated.pm b/lib/Moose/Deprecated.pm index 1df1f05..312604f 100644 --- a/lib/Moose/Deprecated.pm +++ b/lib/Moose/Deprecated.pm @@ -14,14 +14,12 @@ use Package::DeprecationManager 0.07 -deprecations => { 1; +# ABSTRACT: Manages deprecation warnings for Moose + __END__ =pod -=head1 NAME - -Moose::Deprecated - Manages deprecation warnings for Moose - =head1 DESCRIPTION use Moose::Deprecated -api_version => $version; diff --git a/lib/Moose/Manual/Support.pod b/lib/Moose/Manual/Support.pod index 392cea6..80106be 100644 --- a/lib/Moose/Manual/Support.pod +++ b/lib/Moose/Manual/Support.pod @@ -1,9 +1,10 @@ -=pod +package Moose::Manual::Support -=head1 NAME +# ABSTRACT: Policies regarding support, releases, and compatibility. -Moose::Manual::Support - Policies regarding support, releases, and -compatibility. +__END__ + +=pod =head1 SUPPORT POLICY diff --git a/lib/Moose/Meta/Attribute.pm b/lib/Moose/Meta/Attribute.pm index 65214a3..e347197 100644 --- a/lib/Moose/Meta/Attribute.pm +++ b/lib/Moose/Meta/Attribute.pm @@ -80,7 +80,7 @@ sub _inline_throw_error { sub new { my ($class, $name, %options) = @_; $class->_process_options($name, \%options) unless $options{__hack_no_process_options}; # used from clone()... YECHKKK FIXME ICKY YUCK GROSS - + delete $options{__hack_no_process_options}; my %attrs = diff --git a/lib/Moose/Meta/Attribute/Native/Trait/Hash.pm b/lib/Moose/Meta/Attribute/Native/Trait/Hash.pm index 9762d72..34b2998 100644 --- a/lib/Moose/Meta/Attribute/Native/Trait/Hash.pm +++ b/lib/Moose/Meta/Attribute/Native/Trait/Hash.pm @@ -116,7 +116,7 @@ This method does not accept any arguments. =item B -Returns the number of elements in the hash. Also useful for not empty: +Returns the number of elements in the hash. Also useful for not empty: C<< has_options => 'count' >>. This method does not accept any arguments. diff --git a/t/cmop/class_precedence_list.t b/t/cmop/class_precedence_list.t index 7bc1fd4..56ef28f 100644 --- a/t/cmop/class_precedence_list.t +++ b/t/cmop/class_precedence_list.t @@ -11,7 +11,7 @@ use Class::MOP::Class; A / \ B C - \ / + \ / D =cut @@ -73,7 +73,7 @@ ok($@, '... recursive inheritance breaks correctly :)'); | A | | / \ | +->B C-+ - \ / + \ / D =cut @@ -101,8 +101,8 @@ is_deeply( =pod -Test all the class_precedence_lists -using Perl's own dispatcher to check +Test all the class_precedence_lists +using Perl's own dispatcher to check against. =cut diff --git a/t/cmop/random_eval_bug.t b/t/cmop/random_eval_bug.t index 1bf1cca..285edb0 100644 --- a/t/cmop/random_eval_bug.t +++ b/t/cmop/random_eval_bug.t @@ -7,9 +7,10 @@ use Class::MOP; =pod -This tests a bug which is fixed in 0.22 by -localizing all the $@'s around any evals. -This a real pain to track down. +This tests a bug which is fixed in 0.22 by localizing all the $@'s around any +evals. + +This a real pain to track down. Moral of the story: diff --git a/t/metaclasses/moose_exporter.t b/t/metaclasses/moose_exporter.t index 66a0f30..aabe556 100644 --- a/t/metaclasses/moose_exporter.t +++ b/t/metaclasses/moose_exporter.t @@ -273,17 +273,16 @@ use Test::Requires { { package MooseX::OverridingSugar::PassThru; - + sub with { my $caller = shift->name; return $caller . ' called with'; } - + Moose::Exporter->setup_import_methods( with_meta => ['with'], also => 'MooseX::OverridingSugar', ); - } {
[% FOREACH metaclass IN get_all_metaclasses() %] @@ -183,10 +183,10 @@ td.lightgreen { [% END %]
- + [% FOREACH area_name IN [ 'attributes', 'methods', 'superclasses' ] %] [% IF q.param('class') %] - [% IF area == area_name %] + [% IF area == area_name %] [% ELSE %] @@ -200,13 +200,13 @@ td.lightgreen { @@ -253,31 +253,31 @@ td.lightgreen { [% FOREACH method IN meta.get_method_list.sort %] [% IF q.param('method') == method %] - + [% ELSE %] [% END %] - [% END %] + [% END %] [% END %] [% IF area == 'attributes' %] [% FOREACH attr IN meta.get_attribute_list.sort %] [% IF q.param('attr') == attr %] - + [% ELSE %] [% END %] - [% END %] - [% END %] + [% END %] + [% END %] [% IF area == 'superclasses' %] [% FOREACH super IN meta.superclasses.sort %] - [% END %] - [% END %] + [% END %] + [% END %]
[% area_name %][% area_name %] - - - - + + + + [% IF q.param('class') && area == 'attributes' && q.param('attr') %] - [% + [% meta = get_metaclass_by_name(q.param('class')) attr = meta.get_attribute(q.param('attr')) %] @@ -221,7 +221,7 @@ td.lightgreen { [% ELSIF q.param('class') && area == 'methods' && q.param('method') %] - [% + [% meta = get_metaclass_by_name(q.param('class')) method = meta.get_method(q.param('method')) %] @@ -235,7 +235,7 @@ td.lightgreen { - + [% END %]
body
[% deparse_method(method) %]
[% method %][% method %][% method %]
[% attr %][% attr %][% attr %]
[% super %]