1 # Copyright 2002-2007 Interchange Development Group and others
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 2 of the License, or
6 # (at your option) any later version. See the LICENSE file for details.
8 # $Id: grep_mm.coretag,v 1.4 2007-03-30 23:40:54 pajamian Exp $
10 UserTag grep-mm Order function
11 UserTag grep-mm addAttr
12 UserTag grep-mm Interpolate
13 UserTag grep-mm hasEndTag
14 UserTag grep-mm Version $Revision: 1.4 $
15 UserTag grep-mm Routine <<EOR
17 my($func, $opt, $text) = @_;
18 #::logDebug("grep-mm record: " . Vend::Util::uneval_it(\@_));
19 my $table = $opt->{table} || $::Values->{mv_data_table};
20 my $acl = UI::Primitive::get_ui_table_acl($table);
21 return $text unless $acl;
22 my @items = grep /\S/, Text::ParseWords::shellwords($text);
23 return join "\n", UI::Primitive::ui_acl_grep($acl, $func, @items);