projects
/
gitmo/MooseX-StrictConstructor.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(parent:
48ba97e
)
Quote all init_args
Dave Rolsky [Sat, 17 Jul 2010 16:04:48 +0000 (11:04 -0500)]
Changes
patch
|
blob
|
blame
|
history
lib/MooseX/StrictConstructor/Role/Meta/Method/Constructor.pm
patch
|
blob
|
blame
|
history
diff --git
a/Changes
b/Changes
index
811bda7
..
168535c
100644
(file)
--- a/
Changes
+++ b/
Changes
@@
-3,6
+3,8
@@
- Ignore __INSTANCE__ when passed to the constructor. Patch by Jesse
Luehrs. RT #59236.
+- All init args are quoted in the inlined constructor.
+
0.09 2010-07-14
diff --git
a/lib/MooseX/StrictConstructor/Role/Meta/Method/Constructor.pm
b/lib/MooseX/StrictConstructor/Role/Meta/Method/Constructor.pm
index
4000083
..
1dd2142
100644
(file)
--- a/
lib/MooseX/StrictConstructor/Role/Meta/Method/Constructor.pm
+++ b/
lib/MooseX/StrictConstructor/Role/Meta/Method/Constructor.pm
@@
-3,6
+3,7
@@
package MooseX::StrictConstructor::Role::Meta::Method::Constructor;
use strict;
use warnings;
+use B ();
use Carp ();
use Moose::Role;
@@
-15,8
+16,8
@@
around '_generate_BUILDALL' => sub {
$source .= ";\n" if $source;
my @attrs = (
- "__INSTANCE__ => 1",
- map {"$_ => 1,"}
+ "__INSTANCE__ => 1,",
+ map { B::perlstring($_) . ' => 1,' }
grep {defined}
map { $_->init_arg() } @{ $self->_attributes() }
);