[freeside-commits] freeside/FS/FS part_pkg.pm,1.69,1.70

Ivan,,, ivan at wavetail.420.am
Tue May 13 14:20:10 PDT 2008


Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv11212

Modified Files:
	part_pkg.pm 
Log Message:
eliminate warnings on upgrade: "(Odd number of elements in anonymous hash | Use of unintialized value in anonymous hash ) at /usr/local/share/perl/5.8.8/FS/option_Common.pm line 176.

Index: part_pkg.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/part_pkg.pm,v
retrieving revision 1.69
retrieving revision 1.70
diff -u -d -r1.69 -r1.70
--- part_pkg.pm	16 Apr 2008 21:52:37 -0000	1.69
+++ part_pkg.pm	13 May 2008 21:20:08 -0000	1.70
@@ -254,14 +254,17 @@
 Replaces OLD_RECORD with this one in the database.  If there is an error,
 returns the error, otherwise returns false.
 
-Currently available options are: I<pkg_svc> and I<primary_svc>
+Currently available options are: I<pkg_svc>, I<primary_svc> and I<options>
 
 If I<pkg_svc> is set to a hashref with svcparts as keys and quantities as
-values, the appropriate FS::pkg_svc records will be replace.
+values, the appropriate FS::pkg_svc records will be replaced.
 
 If I<primary_svc> is set to the svcpart of the primary service, the appropriate
 FS::pkg_svc record will be updated.
 
+If I<options> is set to a hashref, the appropriate FS::part_pkg_option records
+will be replaced.
+
 =cut
 
 sub replace {
@@ -276,6 +279,8 @@
       ? shift
       : { @_ };
 
+  $options->{options} = {} unless defined($options->{options});
+
   warn "FS::part_pkg::replace called on $new to replace $old with options".
        join(', ', map "$_ => ". $options->{$_}, keys %$options)
     if $DEBUG;



More information about the freeside-commits mailing list