projects
/
kivitendo-erp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
LXDebug: Flag SHOW_CALLER für Ausgabe Dateiname:Zeilennummer bei message() & dump()
[kivitendo-erp.git]
/
SL
/
DB
/
Helper
/
Filtered.pm
diff --git
a/SL/DB/Helper/Filtered.pm
b/SL/DB/Helper/Filtered.pm
index
15e0985
..
a0f522b
100644
(file)
--- a/
SL/DB/Helper/Filtered.pm
+++ b/
SL/DB/Helper/Filtered.pm
@@
-10,13
+10,13
@@
our @EXPORT = qw (filter add_filter_specs);
my %filter_spec;
sub filter {
my %filter_spec;
sub filter {
- my ($class, $key, $value, $prefix) = @_;
+ my ($class, $key, $value, $prefix
, $path, @additional_tokens
) = @_;
my $filters = _get_filters($class);
my $filters = _get_filters($class);
- return ($
key, $value
) unless $filters->{$key};
+ return ($
prefix . $key, $value, $path
) unless $filters->{$key};
- return $filters->{$key}->($key, $value, $prefix);
+ return $filters->{$key}->($key, $value, $prefix
, @additional_tokens
);
}
sub _get_filters {
}
sub _get_filters {
@@
-43,13
+43,13
@@
__END__
=head1 NAME
=head1 NAME
-SL::
Helper::Sort
ed - Manager mixin for filtered results.
+SL::
DB::Helper::Filter
ed - Manager mixin for filtered results.
=head1 SYNOPSIS
In the manager:
=head1 SYNOPSIS
In the manager:
- use SL::Helper::Filtered;
+ use SL::
DB::
Helper::Filtered;
__PACKAGE__->add_filter_specs(
custom_filter_name => sub {
__PACKAGE__->add_filter_specs(
custom_filter_name => sub {
@@
-78,7
+78,7
@@
You can add multiple filters in one call, but only one filter per key.
=item C<filter $key, $value, $prefix>
=item C<filter $key, $value, $prefix>
-Tells the manager to
pply custom filters. If none is
registered for C<$key>,
+Tells the manager to
apply custom filters. If none are
registered for C<$key>,
returns C<$key, $value>.
Otherwise the filter code is called.
returns C<$key, $value>.
Otherwise the filter code is called.
@@
-164,7
+164,7
@@
to make sense to Rose.
=item *
=item *
-You are expec
e
ted to return exactly one key and one value. That can mean you
+You are expected to return exactly one key and one value. That can mean you
have to encapsulate your arguments into C<< or => [] >> or C<< and => [] >> blocks.
=item *
have to encapsulate your arguments into C<< or => [] >> or C<< and => [] >> blocks.
=item *