From: Dave Rolsky Date: Sat, 14 Mar 2009 17:40:03 +0000 (-0500) Subject: Tidy SYNOPSIS code X-Git-Tag: 0.78_01~48 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=68041bdb46dbb76023aad14ec3e0a9fbd8247ffa;p=gitmo%2FClass-MOP.git Tidy SYNOPSIS code --- diff --git a/lib/Class/MOP/Class.pm b/lib/Class/MOP/Class.pm index 1f8f805..44fa2fe 100644 --- a/lib/Class/MOP/Class.pm +++ b/lib/Class/MOP/Class.pm @@ -1111,29 +1111,31 @@ Class::MOP::Class - Class Meta Object # use this for introspection ... # add a method to Foo ... - Foo->meta->add_method('bar' => sub { ... }) + Foo->meta->add_method( 'bar' => sub {...} ) - # get a list of all the classes searched - # the method dispatcher in the correct order - Foo->meta->class_precedence_list() + # get a list of all the classes searched + # the method dispatcher in the correct order + Foo->meta->class_precedence_list() - # remove a method from Foo - Foo->meta->remove_method('bar'); + # remove a method from Foo + Foo->meta->remove_method('bar'); # or use this to actually create classes ... - Class::MOP::Class->create('Bar' => ( - version => '0.01', - superclasses => [ 'Foo' ], - attributes => [ - Class::MOP:::Attribute->new('$bar'), - Class::MOP:::Attribute->new('$baz'), - ], - methods => { - calculate_bar => sub { ... }, - construct_baz => sub { ... } - } - )); + Class::MOP::Class->create( + 'Bar' => ( + version => '0.01', + superclasses => ['Foo'], + attributes => [ + Class::MOP:: : Attribute->new('$bar'), + Class::MOP:: : Attribute->new('$baz'), + ], + methods => { + calculate_bar => sub {...}, + construct_baz => sub {...} + } + ) + ); =head1 DESCRIPTION