[Rt-commit] r5598 - in Object-Declare: lib/Object t
audreyt at bestpractical.com
audreyt at bestpractical.com
Tue Jul 18 15:11:40 EDT 2006
Author: audreyt
Date: Tue Jul 18 15:11:39 2006
New Revision: 5598
Modified:
Object-Declare/Changes
Object-Declare/lib/Object/Declare.pm
Object-Declare/t/01-basic.t
Log:
* This be 0.07.
* Chained "is foo, is bar, is baz" now works; previously only
the first one is recognized.
Reported by: Steven Little
Modified: Object-Declare/Changes
==============================================================================
--- Object-Declare/Changes (original)
+++ Object-Declare/Changes Tue Jul 18 15:11:39 2006
@@ -1,3 +1,9 @@
+[Changes for 0.07 - 2006-07-18]
+
+* Chained "is foo, is bar, is baz" now works; previously only
+ the first one is recognized.
+ Reported by: Steven Little
+
[Changes for 0.06 - 2006-07-17]
* Documentation cleanup; no functional changes.
Modified: Object-Declare/lib/Object/Declare.pm
==============================================================================
--- Object-Declare/lib/Object/Declare.pm (original)
+++ Object-Declare/lib/Object/Declare.pm Tue Jul 18 15:11:39 2006
@@ -1,5 +1,5 @@
package Object::Declare;
-$Object::Declare::VERSION = '0.06';
+$Object::Declare::VERSION = '0.07';
use 5.006;
use strict;
@@ -95,8 +95,8 @@
my ($class, $schema) = @_;
return sub {
- my ($name, $katamari) = @_;
- push @$schema, $name => scalar $class->new($katamari ? $katamari->unroll : ());
+ my $name = shift;
+ push @$schema, $name => scalar $class->new(map { $_->unroll } @_);
};
}
Modified: Object-Declare/t/01-basic.t
==============================================================================
--- Object-Declare/t/01-basic.t (original)
+++ Object-Declare/t/01-basic.t Tue Jul 18 15:11:39 2006
@@ -6,6 +6,8 @@
sub do_declare { declare {
column x =>
+ is rw,
+ is happy,
field1 is 'xxx',
field2 are 'XXX', 'XXX',
is field3;
@@ -21,11 +23,13 @@
x => {
'field1' => 'xxx',
'field2' => ['XXX', 'XXX'],
- 'field3' => 1
+ 'field3' => 1,
+ 'rw' => 1,
+ 'happy' => 1,
},
y => {
'field1' => 'yyy',
- 'field2' => 'YYY'
+ 'field2' => 'YYY',
},
], 'object declared correctly (list context)');
@@ -35,11 +39,13 @@
x => {
'field1' => 'xxx',
'field2' => ['XXX', 'XXX'],
- 'field3' => 1
+ 'field3' => 1,
+ 'rw' => 1,
+ 'happy' => 1,
},
y => {
'field1' => 'yyy',
- 'field2' => 'YYY'
+ 'field2' => 'YYY',
},
}, 'object declared correctly (scalar context)');
More information about the Rt-commit
mailing list