+# not to be confused with export_pkg_change, which is for svcs
+sub export_pkg_location {
+ my( $self, $cust_pkg ) = ( shift, shift, shift );
+
+ return '' unless $cust_pkg->locationnum;
+
+ my $cust_location = $cust_pkg->cust_location;
+
+ $self->_http_queue_standard(
+ 'action' => 'package',
+ (map { $_ => $cust_pkg->get($_) } ('pkgnum', 'change_pkgnum', 'locationnum')),
+ (map { $_ => $cust_location->get($_) } $self->_include_fields),
+ );
+}
+
+sub _http_queue_standard {
+ my $self = shift;
+ my %opts = @_;
+ my $url;
+ if ($opts{'action'} eq 'location') {
+ $url = $self->option('location_url');
+ return '' unless $url;
+ } elsif ($opts{'action'} eq 'package') {
+ $url = $self->option('package_url');
+ return '' unless $url;
+ } else {
+ return "Bad action ".$opts{'action'};
+ }
+ $self->http_queue( '',
+ ( $self->option('ssl_no_verify') ? 'ssl_no_verify' : '' ),
+ $self->option('method'),
+ $url,
+ $self->option('success_regexp'),
+ %opts
+ );
+}
+
+sub _include_fields {
+ my $self = shift;
+ split( /\s+/, $self->option('include_fields') );
+}
+