[freeside-commits] freeside/FS/FS/part_export acct_google.pm, 1.2, 1.3
Mark Wells
mark at wavetail.420.am
Tue Mar 22 14:03:11 PDT 2011
Update of /home/cvs/cvsroot/freeside/FS/FS/part_export
In directory wavetail.420.am:/tmp/cvs-serv2755/FS/FS/part_export
Modified Files:
acct_google.pm
Log Message:
load modules correctly for acct_google
Index: acct_google.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/part_export/acct_google.pm,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -w -d -r1.2 -r1.3
--- acct_google.pm 16 Mar 2011 01:43:29 -0000 1.2
+++ acct_google.pm 22 Mar 2011 21:03:09 -0000 1.3
@@ -3,6 +3,7 @@
use strict;
use vars qw(%info %SIG $CACHE);
use Tie::IxHash;
+
use base 'FS::part_export';
tie my %options, 'Tie::IxHash',
@@ -151,16 +152,23 @@
sub google_handle {
my $self = shift;
- my $class = 'REST::Google::Apps::Provisioning';
my %opt = @_;
- eval "use $class";
-
- die "failed to load $class\n" if $@;
+ my @class = (
+ 'REST::Google::Apps::Provisioning',
+ 'Cache::FileCache',
+ 'LWP::UserAgent 5.815',
+ );
+ foreach (@class) {
+ eval "use $_";
+ die "failed to load $_\n" if $@;
+ }
$CACHE ||= new Cache::FileCache( {
'namespace' => __PACKAGE__,
'cache_root' => "$FS::UID::cache_dir/cache.$FS::UID::datasrc",
} );
- my $google = $class->new( 'domain' => $self->option('domain') );
+ my $google = REST::Google::Apps::Provisioning->new(
+ 'domain' => $self->option('domain')
+ );
# REST::Google::Apps::Provisioning lacks error reporting. We deal
# with that by hooking HTTP::Response to throw a useful fatal error
More information about the freeside-commits
mailing list