Some packages still had a NAME header in the pod, instead of an ABSTRACT comment
sub clear {
my $self = shift;
$self->x(0);
- $self->y(0);
+ $self->y(0);
}
__PACKAGE__->meta->make_immutable;
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__
sub clear {
my $self = shift;
$self->x(0);
- $self->y(0);
+ $self->y(0);
}
1;
-__END__
\ No newline at end of file
+__END__
sub clear {
my $self = shift;
$self->SUPER::clear();
- $self->z(0);
+ $self->z(0);
}
1;
-__END__
\ No newline at end of file
+__END__
sub clear {
my $self = shift;
$self->x(0);
- $self->y(0);
+ $self->y(0);
}
1;
-__END__
\ No newline at end of file
+__END__
sub clear {
my $self = shift;
$self->SUPER::clear();
- $self->z(0);
+ $self->z(0);
}
1;
-__END__
\ No newline at end of file
+__END__
sub new {
my ( $class, %params ) = @_;
-
+
return bless {
x => $params{x} || 10,
y => $params{y},
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();
'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 {
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);
}
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;
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;
}
</style>
<h1>Class::MOP Browser</h1>
<table bgcolor='#CCCCCC' cellpadding='0' cellspacing='0' border='0' align='center' height='400'>
<tr valign='top'>
-
+
<td rowspan='2' width='200'><table cellspacing='0' cellpadding='5' border='0' width='100%'>
[% FOREACH metaclass IN get_all_metaclasses() %]
<tr>
[% END %]
</table></td>
<td height='10' width='250'><table cellspacing='0' cellpadding='5' border='0' width='100%'>
- <tr align='center'>
+ <tr align='center'>
[% FOREACH area_name IN [ 'attributes', 'methods', 'superclasses' ] %]
[% IF q.param('class') %]
- [% IF area == area_name %]
+ [% IF area == area_name %]
<td class='manila'><b>[% area_name %]</b></td>
[% ELSE %]
<td class='lightblue'><a href='?class=[% q.param('class') %]&area=[% area_name %]'>[% area_name %]</a></td>
<td valign='top' rowspan='2' class='lightgreen' width='450'>
<table cellspacing='0' cellpadding='3' border='0'>
- <tr>
- <td class='darkgreen' width='100'></td>
- <td class='darkgreen' width='350'></td>
- </tr>
+ <tr>
+ <td class='darkgreen' width='100'></td>
+ <td class='darkgreen' width='350'></td>
+ </tr>
[% IF q.param('class') && area == 'attributes' && q.param('attr') %]
- [%
+ [%
meta = get_metaclass_by_name(q.param('class'))
attr = meta.get_attribute(q.param('attr'))
%]
[% ELSIF q.param('class') && area == 'methods' && q.param('method') %]
- [%
+ [%
meta = get_metaclass_by_name(q.param('class'))
method = meta.get_method(q.param('method'))
%]
<tr>
<td class='darkgreen' align='right' valign='top'>body</td>
<td class='lightgreen'><pre>[% deparse_method(method) %]</pre></td>
- </tr>
+ </tr>
[% END %]
</table></td>
[% FOREACH method IN meta.get_method_list.sort %]
<tr>
[% IF q.param('method') == method %]
- <td class='darkgreen'><b>[% method %]</b></td>
+ <td class='darkgreen'><b>[% method %]</b></td>
[% ELSE %]
<td class='manila'><a href='?class=[% q.param('class') %]&area=[% q.param('area') %]&method=[% method %]'>[% method %]</a></td>
[% END %]
</tr>
- [% END %]
+ [% END %]
[% END %]
[% IF area == 'attributes' %]
[% FOREACH attr IN meta.get_attribute_list.sort %]
<tr>
[% IF q.param('attr') == attr %]
- <td class='darkgreen'><b>[% attr %]</b></td>
+ <td class='darkgreen'><b>[% attr %]</b></td>
[% ELSE %]
<td class='manila'><a href='?class=[% q.param('class') %]&area=[% q.param('area') %]&attr=[% attr %]'>[% attr %]</a></td>
[% END %]
</tr>
- [% END %]
- [% END %]
+ [% END %]
+ [% END %]
[% IF area == 'superclasses' %]
[% FOREACH super IN meta.superclasses.sort %]
<tr>
<td class='manila'><a href='?class=[% super %]'>[% super %]</a></td>
</tr>
- [% END %]
- [% END %]
+ [% END %]
+ [% END %]
</table></div></td>
[% END %]
# 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 . "'");
}
};
}
-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;
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 {
}
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 {
my $class = shift;
my $package_name;
-
+
if ( @_ % 2 ) {
$package_name = shift;
} else {
}
# and check the metaclass compatibility
- $meta->_check_metaclass_compatibility();
+ $meta->_check_metaclass_compatibility();
Class::MOP::store_metaclass_by_name($package_name, $meta);
sub _create_meta_instance {
my $self = shift;
-
+
my $instance = $self->instance_metaclass->new(
associated_metaclass => $self,
attributes => [ $self->get_all_attributes() ],
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) }
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,
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;
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<Class::MOP::Method> subclass which is subclassed by
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<apply>, which does a half-assed job
} => $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')};
}
=pod
-=head1 NAME
-
-Class::MOP::Module - Module Meta Object
-
=head1 DESCRIPTION
A module is essentially a L<Class::MOP::Package> with metadata, in our
# introspection
-sub meta {
+sub meta {
require Class::MOP::Class;
Class::MOP::Class->initialize(blessed($_[0]) || $_[0]);
}
}
# 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;
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.
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 {
# 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 {
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;
-=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
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 =
=item B<count>
-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.
A
/ \
B C
- \ /
+ \ /
D
=cut
| A |
| / \ |
+->B C-+
- \ /
+ \ /
D
=cut
=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
=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:
{
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',
);
-
}
{