/[notice-sender]/trunk/Nos.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/Nos.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 25 by dpavlin, Mon May 16 13:52:43 2005 UTC revision 27 by dpavlin, Mon May 16 16:25:14 2005 UTC
# Line 9  require Exporter; Line 9  require Exporter;
9  our @ISA = qw(Exporter);  our @ISA = qw(Exporter);
10    
11  our %EXPORT_TAGS = ( 'all' => [ qw(  our %EXPORT_TAGS = ( 'all' => [ qw(
         add_member_to_list  
         add_message_to_queue  
12  ) ] );  ) ] );
13    
14  our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } );  our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } );
# Line 18  our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all' Line 16  our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'
16  our @EXPORT = qw(  our @EXPORT = qw(
17  );  );
18    
19  our $VERSION = '0.1';  our $VERSION = '0.2';
20    
21  use Class::DBI::Loader;  use Class::DBI::Loader;
22  use Email::Valid;  use Email::Valid;
# Line 87  Add new member to list Line 85  Add new member to list
85    
86  C<name> parametar is optional.  C<name> parametar is optional.
87    
88  Return true if user is added.  Return member ID if user is added.
89    
90  =cut  =cut
91    
# Line 105  sub add_member_to_list { Line 103  sub add_member_to_list {
103                  return 0;                  return 0;
104          }          }
105    
106          print "# $name <$email>\n";          print STDERR "# $name <$email>\n";
107    
108          my $lists = $self->{'loader'}->find_class('lists');          my $lists = $self->{'loader'}->find_class('lists');
109          my $users = $self->{'loader'}->find_class('users');          my $users = $self->{'loader'}->find_class('users');
# Line 129  sub add_member_to_list { Line 127  sub add_member_to_list {
127          $this_user->dbi_commit;          $this_user->dbi_commit;
128          $user_on_list->dbi_commit;          $user_on_list->dbi_commit;
129    
130          return 1;          return $this_user->id;
131  }  }
132    
133  =head2 add_message_to_queue  =head2 add_message_to_queue
# Line 247  sub send_queued_messages { Line 245  sub send_queued_messages {
245    
246  =head1 EXPORT  =head1 EXPORT
247    
248  Exported methods are also available using SOAP interface. For now, those are:  Nothing.
   
 =over 4  
   
 =item add_member_to_list  
   
 =item add_message_to_queue  
   
 =back  
   
249    
250  =head1 SEE ALSO  =head1 SEE ALSO
251    

Legend:
Removed from v.25  
changed lines
  Added in v.27

  ViewVC Help
Powered by ViewVC 1.1.26