X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=FS%2FFS%2Fpart_export%2Fnena2.pm;h=4d3f08f988bc0b0dc0f447e7e8f298918582cf1a;hp=fa3597b7aa017d7be3e5d74ae0b00279be3f2bd0;hb=df9caf6e66f4fd7a6a5f46438583414314d82107;hpb=01717353564b79dd143220ec67207a2d245f24e9 diff --git a/FS/FS/part_export/nena2.pm b/FS/FS/part_export/nena2.pm index fa3597b7a..4d3f08f98 100644 --- a/FS/FS/part_export/nena2.pm +++ b/FS/FS/part_export/nena2.pm @@ -169,15 +169,6 @@ my %function_code = ( ); sub immediate { - local $@; - eval "use Geo::StreetAddress::US"; - if ($@) { - if ($@ =~ /^Can't locate/) { - return "Geo::StreetAddress::US must be installed to use the NENA2 export."; - } else { - die $@; - } - } # validate some things my ($self, $action, $svc) = @_; @@ -209,6 +200,15 @@ sub create_item { } sub data { + local $@; + eval "use Geo::StreetAddress::US"; + if ($@) { + if ($@ =~ /^Can't locate/) { + return "Geo::StreetAddress::US must be installed to use the NENA2 export."; + } else { + die $@; + } + } # generate the entire record here. reconciliation of multiple updates to # the same service can be done at process time. my $self = shift; @@ -259,7 +259,6 @@ sub data { } else { $hash{location} = $cust_location->address2; } - $hash{location} = $location_hash->{address2}; # customer name and class $hash{customer_name} = $svc->phone_name_or_cust;