use Tie::RefHash;
tie %hash, 'Tie::RefHash'; #this part is important
- %hash = {
+ %hash = (
$cust_pkg => [ $svc_acct ],
- };
+ ...
+ );
$cust_main->insert( \%hash );
=cut
sub insert {
my $self = shift;
+ my @param = @_;
local $SIG{HUP} = 'IGNORE';
local $SIG{INT} = 'IGNORE';
return $error;
}
- if ( @_ ) {
- my $cust_pkgs = shift;
+ if ( @param ) {
+ my $cust_pkgs = shift @param;
foreach my $cust_pkg ( keys %$cust_pkgs ) {
$cust_pkg->custnum( $self->custnum );
$error = $cust_pkg->insert;
|| $self->ut_textn('county')
|| $self->ut_textn('state')
;
+ #barf. need message catalogs. i18n. etc.
+ $error .= "Please select a referral."
+ if $error =~ /^Illegal or empty \(numeric\) refnum: /;
return $error if $error;
return "Unknown agent"
=head1 VERSION
-$Id: cust_main.pm,v 1.11 2001-04-09 23:05:15 ivan Exp $
+$Id: cust_main.pm,v 1.13 2001-05-07 02:07:38 ivan Exp $
=head1 BUGS