Something
public text v1 · immutablesub getAct
{
my($act)=@_; $act=~s/^UPSELL-//g; $act=~s/^xr//g;
return int $act;
}
sub getProg
{
my($act,$prog)=@_;
if($act=~/^xr/) { $prog='xrated'; }
else { $prog='cecash'; }
return $prog;
}
sub getPtype
{
my($ptype)=@_;
if($ptype=~/(cc|jr|pb|pe|pm|pr)/i) { $ptype="CC"; }
elsif($ptype=~/(wt|jt|el)/i) { $ptype="CK"; }
else{ $ptype="OT"; }
return $ptype;
}
sub isCross
{
my($act,$pkg)=@_;
my $result=0;
if($pkg eq "999" || $act=~/^upsell/i) { $result=1; }
return $result;
}