[interchange-cvs] interchange - pajamian modified lib/Vend/Ship.pm
interchange-cvs at icdevgroup.org
interchange-cvs at icdevgroup.org
Sun Aug 5 08:57:49 EDT 2007
User: pajamian
Date: 2007-08-05 12:57:48 GMT
Modified: lib/Vend Ship.pm
Log:
More shipping code cleanup
Revision Changes Path
2.25 +13 -16 interchange/lib/Vend/Ship.pm
rev 2.25, prev_rev 2.24
Index: Ship.pm
===================================================================
RCS file: /var/cvs/interchange/lib/Vend/Ship.pm,v
retrieving revision 2.24
retrieving revision 2.25
diff -u -r2.24 -r2.25
--- Ship.pm 4 Aug 2007 12:40:31 -0000 2.24
+++ Ship.pm 5 Aug 2007 12:57:48 -0000 2.25
@@ -1,6 +1,6 @@
# Vend::Ship - Interchange shipping code
#
-# $Id: Ship.pm,v 2.24 2007/08/04 12:40:31 pajamian Exp $
+# $Id: Ship.pm,v 2.25 2007/08/05 12:57:48 pajamian Exp $
#
# Copyright (C) 2002-2005 Interchange Development Group
# Copyright (C) 1996-2002 Red Hat, Inc.
@@ -257,22 +257,6 @@
$first = process_new_beginning(\@shipping, \@line, $_);
}
- elsif(/^\s+min(?:imum)?\s+(\S+)/i) {
- my $min = $1;
- if ($first) {
- undef $first;
- $line[MIN] = $min;
- }
- else {
- push @shipping, [ @line ];
- $line[MIN] = $min;
- if(ref $line[OPT]) {
- my $ref = $line[OPT];
- $line[OPT] = { %$ref };
- }
-
- }
- }
else {
no strict 'refs';
s/^\s+//;
@@ -281,6 +265,19 @@
$k = uc $k;
$k = $Ship_remap{$k}
if defined $Ship_remap{$k};
+
+ if ($k eq 'MIN') {
+ # Special case handling for minimum line.
+ if ($first) {
+ undef $first;
+ }
+ else {
+ # Push the record we have to this point.
+ my @lcopy = @line;
+ process_new_beginning(\@shipping, \@lcopy);
+ }
+ }
+
$Ship_handler{$k}->(\$v, \$k, \@line)
if defined $Ship_handler{$k};
eval {
More information about the interchange-cvs
mailing list