r18776 - /trunk/libobject-declare-perl/debian/control
yvesago-guest at users.alioth.debian.org
yvesago-guest at users.alioth.debian.org
Fri Apr 18 15:02:35 UTC 2008
Author: yvesago-guest
Date: Fri Apr 18 15:02:34 2008
New Revision: 18776
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=18776
Log:
adjust description
Modified:
trunk/libobject-declare-perl/debian/control
Modified: trunk/libobject-declare-perl/debian/control
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libobject-declare-perl/debian/control?rev=18776&op=diff
==============================================================================
--- trunk/libobject-declare-perl/debian/control (original)
+++ trunk/libobject-declare-perl/debian/control Fri Apr 18 15:02:34 2008
@@ -20,25 +20,10 @@
order of declaration (allowing duplicates), suitable for putting into a hash.
In scalar context, declare returns a hash reference.
.
- Using a flexible import interface, one can change exported helper
- functions names (declarator), words to link labels and values together
- (copula), and the table of named classes to declare (mapping):
+ Example : fonction for definning some declarative object
.
- use Object::Declare
- declarator => ['declare'], # list of declarators
- copula => { # list of words, or a map
- is => '', # from copula to label prefixes,
- are => '', # or to callback that e.g. turns
- has => sub { has => @_ }, # "has X" to "has is X" and
- # "X has 1" to "has is [X => 1]"
- },
- aliases => { # list of label aliases:
- more => 'less', # turns "is more" into "is less"
- # and "more is 1" into "less is 1"
- },
- mapping => {
- column => 'MyApp::Column', # class name to call ->new to
- param => sub { # arbitrary coderef also works
- bless(\@_, 'MyApp::Param');
- },
- };
+ sub do_declare { declare {
+ column x =>
+ is rw,
+ is Very::Happy;
+ } };
More information about the Pkg-perl-cvs-commits
mailing list