[freeside-commits] freeside/FS/FS cust_bill_pkg.pm,1.42,1.43
Ivan,,,
ivan at wavetail.420.am
Fri Oct 16 15:39:05 PDT 2009
Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv20522
Modified Files:
cust_bill_pkg.pm
Log Message:
make warning about expensive lookup a carp & controlled by $DEBUG
Index: cust_bill_pkg.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/cust_bill_pkg.pm,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -d -r1.42 -r1.43
--- cust_bill_pkg.pm 6 Oct 2009 23:51:45 -0000 1.42
+++ cust_bill_pkg.pm 16 Oct 2009 22:39:02 -0000 1.43
@@ -2,6 +2,7 @@
use strict;
use vars qw( @ISA $DEBUG $me );
+use Carp;
use FS::Record qw( qsearch qsearchs dbdef dbh );
use FS::cust_main_Mixin;
use FS::cust_pkg;
@@ -18,7 +19,7 @@
@ISA = qw( FS::cust_main_Mixin FS::Record );
-$DEBUG = 2;
+$DEBUG = 1;
$me = '[FS::cust_bill_pkg]';
=head1 NAME
@@ -342,7 +343,7 @@
sub cust_pkg {
my $self = shift;
- #warn "$me $self -> cust_pkg"; #carp?
+ carp "$me $self -> cust_pkg" if $DEBUG;
qsearchs( 'cust_pkg', { 'pkgnum' => $self->pkgnum } );
}
@@ -627,7 +628,7 @@
#split usage from recur
my $usage = sprintf( "%.2f", $cust_bill_pkg{recur}->usage );
- warn "usage is $usage\n" if $DEBUG;
+ warn "usage is $usage\n" if $DEBUG > 1;
if ($usage) {
my $cust_bill_pkg_usage =
new FS::cust_bill_pkg { $cust_bill_pkg{recur}->hash };
More information about the freeside-commits
mailing list