diff options
author | cvs2git <cvs2git> | 2004-04-07 09:08:35 +0000 |
---|---|---|
committer | cvs2git <cvs2git> | 2004-04-07 09:08:35 +0000 |
commit | 022491d9d2723ca4d7d0718cdb1fd67e7652428e (patch) | |
tree | fc1e50c0d78ecc401ef2214a6a11ee07242be0f8 /eg/export_template.pm | |
parent | 35effa1bf4ac902547615c816960bbc8db8e7256 (diff) |
This commit was manufactured by cvs2svn to create tag 'NET_WHOIS_RAW_0_31'.NET_WHOIS_RAW_0_31
Diffstat (limited to 'eg/export_template.pm')
-rw-r--r-- | eg/export_template.pm | 81 |
1 files changed, 0 insertions, 81 deletions
diff --git a/eg/export_template.pm b/eg/export_template.pm deleted file mode 100644 index 2c199db..0000000 --- a/eg/export_template.pm +++ /dev/null @@ -1,81 +0,0 @@ -package FS::part_export::myexport; - -use vars qw(@ISA %info); -use Tie::IxHash; -use FS::part_export; - -@ISA = qw(FS::part_export); - -tie my %options, 'Tie::IxHash', - 'regular_option' => { label => 'Option description', default => 'value' }, - 'select_option' => { label => 'Select option description', - type => 'select', options=>[qw(chocolate vanilla)], - default => 'vanilla', - }, - 'textarea_option' => { label => 'Textarea option description', - type => 'textarea', - default => 'Default text.', - }, - 'checkbox_option' => { label => 'Checkbox label', type => 'checkbox' }, -; - -%info = ( - 'svc' => 'svc_acct', - #'svc' => [qw( svc_acct svc_forward )], - 'desc' => - 'Export short description', - 'options' => \%options, - 'nodomain' => 'Y', - 'notes' => <<'END' -HTML notes about this export. -END - -sub rebless { shift; } - -sub _export_insert { - my($self, $svc_something) = (shift, shift); - $err_or_queue = $self->myexport_queue( $svc_something->svcnum, 'insert', - $svc_something->username, $svc_something->_password ); - ref($err_or_queue) ? '' : $err_or_queue; -} - -sub _export_replace { - my( $self, $new, $old ) = (shift, shift, shift); - #return "can't change username with myexport" - # if $old->username ne $new->username; - #return '' unless $old->_password ne $new->_password; - $err_or_queue = $self->myexport_queue( $new->svcnum, - 'replace', $new->username, $new->_password ); - ref($err_or_queue) ? '' : $err_or_queue; -} - -sub _export_delete { - my( $self, $svc_something ) = (shift, shift); - $err_or_queue = $self->myexport_queue( $svc_something->svcnum, - 'delete', $svc_something->username ); - ref($err_or_queue) ? '' : $err_or_queue; -} - -#a good idea to queue anything that could fail or take any time -sub myexport_queue { - my( $self, $svcnum, $method ) = (shift, shift, shift); - my $queue = new FS::queue { - 'svcnum' => $svcnum, - 'job' => "FS::part_export::myexport::myexport_$method", - }; - $queue->insert( @_ ) or $queue; -} - -sub myexport_insert { #subroutine, not method - my( $username, $password ) = @_; - #do things with $username and $password -} - -sub myexport_replace { #subroutine, not method -} - -sub myexport_delete { #subroutine, not method - my( $username ) = @_; - #do things with $username -} - |