MiniVend Akopia Services

[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date ][Minivend by thread ]

mv 3:12 global sub problem



******    message to minivend-users from "Russ" <russ@khouse.org>     ******

Anyone know Global Subs well?  The error I can't decipher is at the bottom
of this thing.

The [perl] in my mv page is:
[perl arg=sub interpolate=1] affiliate_check ([loop-data affiliatesdb
affiliatecode])[/perl]


The Sub code is this (it is referenced in my minivend.cfg):
GlobalSub <<EndOfSub

sub affiliate_check {

my($affiliatecode) = $_[0];
my($code, $subtotal, $sourceid, $total, $aff);

my $file = "/home/minivend/catalogs/cb/products/affiliates.txt";
open (FILE, "<$file");
my @AFF = <FILE>;
close (FILE);

$total = 0;

foreach $aff(@AFF)
{
        ($code, $subtotal, $sourceid) = split (/\t/,$aff);
        if ($sourceid eq $affiliatecode)
        {
                $total += $subtotal;
        }

}
return $total;
}
EndOfSub

The output is ok for the first one in the loop, but not the rest of them.


The error I get is:

xxx.xxx.xxx.xxx xCAUzXq2:xxx.xxx.xxx.xxx - [13/May/1999:15:21:45 -0700] cb
/shop/cb/
query/check_all_affiliates Safe: Unable to create sub named
"*Safe::Root10::affi
liate_check" at (eval 79) line 1.
>
>  affiliate_check (AC662003)



Russ
--------------------------
Earn Money to surf the Internet Click Here!
http://www.alladvantage.com/refhome.asp?refid=AWW-495

-
To unsubscribe from the list, DO NOT REPLY to this message.  Instead, send
email with 'UNSUBSCRIBE minivend-users' in the body to Majordomo@minivend.com.
Archive of past messages: http://www.minivend.com/minivend/minivend-list


Search for: Match: Format: Sort by: