cvsuser 04/02/18 11:28:02
Modified: App-Context/lib/App/Context Cmd.pm
Log:
added '|' as highest priority arg separator (over [:;,])
Revision Changes Path
1.6 +9 -3 p5ee/App-Context/lib/App/Context/Cmd.pm
Index: Cmd.pm
===================================================================
RCS file: /cvs/public/p5ee/App-Context/lib/App/Context/Cmd.pm,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -w -r1.5 -r1.6
--- Cmd.pm 2 Feb 2004 21:34:06 -0000 1.5
+++ Cmd.pm 18 Feb 2004 19:28:02 -0000 1.6
@@ -1,6 +1,6 @@
#############################################################################
-## $Id: Cmd.pm,v 1.5 2004/02/02 21:34:06 spadkins Exp $
+## $Id: Cmd.pm,v 1.6 2004/02/18 19:28:02 spadkins Exp $
#############################################################################
package App::Context::Cmd;
@@ -99,7 +99,10 @@
$arg = shift(@ARGV);
if ($arg =~ /^\[(.*)\]$/) {
$contents = $1;
- if ($arg =~ /:/) {
+ if ($arg =~ /\|/) {
+ $arg = [ split(/ *\| */,$contents) ];
+ }
+ elsif ($arg =~ /:/) {
$arg = [ split(/ *: */,$contents) ];
}
elsif ($arg =~ /;/) {
@@ -111,7 +114,10 @@
}
elsif ($arg =~ /^\{(.*)\}$/) {
$contents = $1;
- if ($arg =~ /:/) {
+ if ($arg =~ /\|/) {
+ $arg = { split(/ *[\|=>]+ */,$contents) };
+ }
+ elsif ($arg =~ /:/) {
$arg = { split(/ *[:=>]+ */,$contents) };
}
elsif ($arg =~ /;/) {