r16710 - in /trunk/libclass-data-accessor-perl: README debian/changelog
gregoa-guest at users.alioth.debian.org
gregoa-guest at users.alioth.debian.org
Fri Mar 7 13:43:35 UTC 2008
Author: gregoa-guest
Date: Fri Mar 7 13:43:34 2008
New Revision: 16710
URL: http://svn.debian.org/wsvn/?sc=1&rev=16710
Log:
Revert unannounced changes to README (was converted from MS-DOS to Unix
line feeds).
Modified:
trunk/libclass-data-accessor-perl/README
trunk/libclass-data-accessor-perl/debian/changelog
Modified: trunk/libclass-data-accessor-perl/README
URL: http://svn.debian.org/wsvn/trunk/libclass-data-accessor-perl/README?rev=16710&op=diff
==============================================================================
--- trunk/libclass-data-accessor-perl/README (original)
+++ trunk/libclass-data-accessor-perl/README Fri Mar 7 13:43:34 2008
@@ -1,8 +1,8 @@
-NAME
- Class::Data::Accessor - Inheritable, overridable class and instance data
- accessor creation
-
-SYNOPSIS
+NAME
+ Class::Data::Accessor - Inheritable, overridable class and instance data
+ accessor creation
+
+SYNOPSIS
package Stuff;
use base qw(Class::Data::Accessor);
@@ -25,91 +25,91 @@
Stuff->DataFile; # still returns /etc/stuff/data
-DESCRIPTION
- Class::Data::Accessor is the marriage of Class::Accessor and
- Class::Data::Inheritable into a single module. It is used for creating
- accessors to class data that overridable in subclasses as well as in
- class instances.
-
- For example:
-
+DESCRIPTION
+ Class::Data::Accessor is the marriage of Class::Accessor and
+ Class::Data::Inheritable into a single module. It is used for creating
+ accessors to class data that overridable in subclasses as well as in
+ class instances.
+
+ For example:
+
Pere::Ubu->mk_classaccessor('Suitcase');
- will generate the method Suitcase() in the class Pere::Ubu.
-
- This new method can be used to get and set a piece of class data.
-
+ will generate the method Suitcase() in the class Pere::Ubu.
+
+ This new method can be used to get and set a piece of class data.
+
Pere::Ubu->Suitcase('Red');
$suitcase = Pere::Ubu->Suitcase;
- Taking this one step further, you can make a subclass that inherits from
- Pere::Ubu:
-
+ Taking this one step further, you can make a subclass that inherits from
+ Pere::Ubu:
+
package Raygun;
use base qw(Pere::Ubu);
# Raygun's suitcase is Red.
$suitcase = Raygun->Suitcase;
- Raygun inherits its Suitcase class data from Pere::Ubu.
-
- Inheritance of class data works analogous to method inheritance. As long
- as Raygun does not "override" its inherited class data (by using
- Suitcase() to set a new value) it will continue to use whatever is set
- in Pere::Ubu and inherit further changes:
-
+ Raygun inherits its Suitcase class data from Pere::Ubu.
+
+ Inheritance of class data works analogous to method inheritance. As long
+ as Raygun does not "override" its inherited class data (by using
+ Suitcase() to set a new value) it will continue to use whatever is set
+ in Pere::Ubu and inherit further changes:
+
# Both Raygun's and Pere::Ubu's suitcases are now Blue
Pere::Ubu->Suitcase('Blue');
- However, should Raygun decide to set its own Suitcase() it has now
- "overridden" Pere::Ubu and is on its own, just like if it had overridden
- a method:
-
+ However, should Raygun decide to set its own Suitcase() it has now
+ "overridden" Pere::Ubu and is on its own, just like if it had overridden
+ a method:
+
# Raygun has an orange suitcase, Pere::Ubu's is still Blue.
Raygun->Suitcase('Orange');
- Now that Raygun has overridden Pere::Ubu, further changes by Pere::Ubu
- no longer effect Raygun.
-
+ Now that Raygun has overridden Pere::Ubu, further changes by Pere::Ubu
+ no longer effect Raygun.
+
# Raygun still has an orange suitcase, but Pere::Ubu is using Samsonite.
Pere::Ubu->Suitcase('Samsonite');
- You can also override this class data on a per-object basis. If $obj isa
- Pere::Ubu then
-
+ You can also override this class data on a per-object basis. If $obj isa
+ Pere::Ubu then
+
$obj->Suitcase; # will return Samsonite
$obj->Suitcase('Purple'); # will set Suitcase *for this object only*
- And after you've done that,
-
+ And after you've done that,
+
$obj->Suitcase; # will return Purple
- but
-
+ but
+
Pere::Ubu->Suitcase; # will still return Samsonite
- If you don't want this behaviour use Class::Data::Inheritable instead.
-
- "mk_classaccessor" will die if used as an object method instead of as a
- class method.
-
-METHODS
- mk_classaccessor
+ If you don't want this behaviour use Class::Data::Inheritable instead.
+
+ "mk_classaccessor" will die if used as an object method instead of as a
+ class method.
+
+METHODS
+ mk_classaccessor
Class->mk_classaccessor($data_accessor_name);
Class->mk_classaccessor($data_accessor_name => $value);
- This is a class method used to declare new class data accessors. A new
- accessor will be created in the Class using the name from
- $data_accessor_name, and optionally initially setting it to the given
- value.
-
- To facilitate overriding, mk_classaccessor creates an alias to the
- accessor, _field_accessor(). So Suitcase() would have an alias
- _Suitcase_accessor() that does the exact same thing as Suitcase(). This
- is useful if you want to alter the behavior of a single accessor yet
- still get the benefits of inheritable class data. For example.
-
+ This is a class method used to declare new class data accessors. A new
+ accessor will be created in the Class using the name from
+ $data_accessor_name, and optionally initially setting it to the given
+ value.
+
+ To facilitate overriding, mk_classaccessor creates an alias to the
+ accessor, _field_accessor(). So Suitcase() would have an alias
+ _Suitcase_accessor() that does the exact same thing as Suitcase(). This
+ is useful if you want to alter the behavior of a single accessor yet
+ still get the benefits of inheritable class data. For example.
+
sub Suitcase {
my($self) = shift;
warn "Fashion tragedy" if @_ and $_[0] eq 'Plaid';
@@ -117,36 +117,36 @@
$self->_Suitcase_accessor(@_);
}
- Overriding accessors does not work in the same class as you declare the
- accessor in. It only works in subclasses due to the fact that
- subroutines are loaded at compile time and accessors are loaded at
- runtime, thus overriding any subroutines with the same name in the same
- class.
-
- mk_classaccessors(@accessornames)
- Takes a list of names and generates an accessor for each name in the
- list using "mk_classaccessor".
-
-AUTHORS
- Based on the creative stylings of Damian Conway, Michael G Schwern, Tony
- Bowden (Class::Data::Inheritable) and Michael G Schwern, Marty Pauley
- (Class::Accessor).
-
- Coded by Matt S Trout Tweaks by Christopher H. Laco.
-
-BUGS and QUERIES
- If your object isn't hash-based, this will currently break. My
- modifications aren't exactly sophisticated so far.
-
- mstrout at cpan.org or bug me on irc.perl.org, nick mst claco at cpan.org or
- irc.perl.org, nick claco
-
-LICENSE
- This module is free software. It may be used, redistributed and/or
- modified under the terms of the Perl Artistic License (see
- http://www.perl.com/perl/misc/Artistic.html)
-
-SEE ALSO
- perltootc has a very elaborate discussion of class data in Perl.
- Class::Accessor, Class::Data::Inheritable
-
+ Overriding accessors does not work in the same class as you declare the
+ accessor in. It only works in subclasses due to the fact that
+ subroutines are loaded at compile time and accessors are loaded at
+ runtime, thus overriding any subroutines with the same name in the same
+ class.
+
+ mk_classaccessors(@accessornames)
+ Takes a list of names and generates an accessor for each name in the
+ list using "mk_classaccessor".
+
+AUTHORS
+ Based on the creative stylings of Damian Conway, Michael G Schwern, Tony
+ Bowden (Class::Data::Inheritable) and Michael G Schwern, Marty Pauley
+ (Class::Accessor).
+
+ Coded by Matt S Trout Tweaks by Christopher H. Laco.
+
+BUGS and QUERIES
+ If your object isn't hash-based, this will currently break. My
+ modifications aren't exactly sophisticated so far.
+
+ mstrout at cpan.org or bug me on irc.perl.org, nick mst claco at cpan.org or
+ irc.perl.org, nick claco
+
+LICENSE
+ This module is free software. It may be used, redistributed and/or
+ modified under the terms of the Perl Artistic License (see
+ http://www.perl.com/perl/misc/Artistic.html)
+
+SEE ALSO
+ perltootc has a very elaborate discussion of class data in Perl.
+ Class::Accessor, Class::Data::Inheritable
+
Modified: trunk/libclass-data-accessor-perl/debian/changelog
URL: http://svn.debian.org/wsvn/trunk/libclass-data-accessor-perl/debian/changelog?rev=16710&op=diff
==============================================================================
--- trunk/libclass-data-accessor-perl/debian/changelog (original)
+++ trunk/libclass-data-accessor-perl/debian/changelog Fri Mar 7 13:43:34 2008
@@ -11,8 +11,10 @@
* debian/rules:
- updated with dh-make-perl's help
- don't install README any more (text version of the POD documentation)
+ * Revert unannounced changes to README (was converted from MS-DOS to Unix
+ line feeds).
- -- gregor herrmann <gregor+debian at comodo.priv.at> Fri, 07 Mar 2008 14:33:35 +0100
+ -- gregor herrmann <gregor+debian at comodo.priv.at> Fri, 07 Mar 2008 14:41:16 +0100
libclass-data-accessor-perl (0.04001-1) unstable; urgency=low
More information about the Pkg-perl-cvs-commits
mailing list