Added information on common failure causes to the perldoc.
[freeside.git] / FS / FS / part_export / domreg_opensrs.pm
index 5d5c595..0ef371a 100644 (file)
@@ -7,7 +7,6 @@ use FS::Conf;
 use FS::part_export::null;
 use FS::svc_domain;
 use FS::part_pkg;
-use Net::OpenSRS;
 
 =head1 NAME
 
@@ -32,6 +31,10 @@ on the setting of the svc_domain's action field.
 
 =back
 
+This export uses Net::OpenSRS.  Registration and transfer attempts will fail unless Net::OpenSRS is installed
+and LWP::UserAgent is able to make HTTPS posts.  You can turn on debugging messages and use the OpenSRS test
+gateway when setting up this export.
+
 =cut
 
 @ISA = qw(FS::part_export::null);
@@ -193,6 +196,9 @@ sub _export_insert {
 
   return if $svc_domain->action eq 'I';  # Ignoring registration, just doing DNS
 
+  eval "use Net::OpenSRS;";
+  return $@ if $@;
+
   # Get the TLD of the new domain
   my @bits = split /\./, $svc_domain->domain;
 
@@ -265,9 +271,10 @@ sub registrar {
 
 =head1 SEE ALSO
 
-L<FS::part_export_option>, L<FS::export_svc>, L<FS::svc_domain>,
+L<Net::OpenSRS>, L<FS::part_export_option>, L<FS::export_svc>, L<FS::svc_domain>,
 L<FS::Record>, schema.html from the base documentation.
 
+
 =cut
 
 1;