projects
/
gruntmaster-page.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
251f53e
)
Pass env to mangle in Generic
author
Marius Gavrilescu
<marius@ieval.ro>
Wed, 26 Mar 2014 05:56:54 +0000
(07:56 +0200)
committer
Marius Gavrilescu
<marius@ieval.ro>
Wed, 26 Mar 2014 05:56:54 +0000
(07:56 +0200)
lib/Gruntmaster/Page/Generic.pm
patch
|
blob
|
blame
|
history
diff --git
a/lib/Gruntmaster/Page/Generic.pm
b/lib/Gruntmaster/Page/Generic.pm
index eefa9080e3f41d52ecca6a89a247895bcc4d304c..e0eb290edc86991394206ecf67d0971f30b33a5a 100644
(file)
--- a/
lib/Gruntmaster/Page/Generic.pm
+++ b/
lib/Gruntmaster/Page/Generic.pm
@@
-48,7
+48,7
@@
sub list {
exists $thing{columns} ? (columns => $thing{columns}) : (),
});
my @thing = map +{rs => $_, $_->get_columns}, $rs->all;
exists $thing{columns} ? (columns => $thing{columns}) : (),
});
my @thing = map +{rs => $_, $_->get_columns}, $rs->all;
- @thing = map { $thing{mangle}->(); $_ } @thing if exists $thing{mangle};
+ @thing = map { $thing{mangle}->(
$env
); $_ } @thing if exists $thing{mangle};
@thing = grep { $thing{choose}->() } @thing if exists $thing{choose};
@thing = sort { $thing{sortby}->() } @thing if exists $thing{sortby};
$thing{group} //= sub { $thing{id} };
@thing = grep { $thing{choose}->() } @thing if exists $thing{choose};
@thing = sort { $thing{sortby}->() } @thing if exists $thing{sortby};
$thing{group} //= sub { $thing{id} };
@@
-65,7
+65,8
@@
sub entry {
my %thing = %$thing;
debug $env => "Rsname is $thing{rsname} and id is $id";
my %params = map {+ rs => $_, $_->get_columns } db($env)->resultset($thing{rsname})->find($id);
my %thing = %$thing;
debug $env => "Rsname is $thing{rsname} and id is $id";
my %params = map {+ rs => $_, $_->get_columns } db($env)->resultset($thing{rsname})->find($id);
- $thing{mangle}->(local $_ = \%params) if exists $thing{mangle};
+ local $_ = \%params;
+ $thing{mangle}->($env) if exists $thing{mangle};
wantarray ? %params : \%params
}
wantarray ? %params : \%params
}
This page took
0.011131 seconds
and
4
git commands to generate.