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

Contents of /trunk/sender.pl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1 - (show annotations)
Fri May 13 21:17:58 2005 UTC (18 years, 10 months ago) by dpavlin
File MIME type: text/plain
File size: 948 byte(s)
initial import

1 #!/usr/bin/perl -w
2
3 use strict;
4 use Class::DBI::Loader::Pg;
5 use Getopt::Long;
6 use Data::Dumper;
7
8 my ($lists,$debug) = (0,0);
9
10 my $result = GetOptions(
11 "lists" => \$lists,
12 "debug" => \$debug,
13 );
14
15
16 my $loader = Class::DBI::Loader::Pg->new(
17 debug => $debug,
18 dsn => "dbi:Pg:dbname=notices",
19 user => "dpavlin",
20 password => "",
21 namespace => "Noticer",
22 # additional_classes => qw/Class::DBI::AbstractSearch/,
23 # additional_base_classes => qw/My::Stuff/,
24 relationships => 1
25 );
26
27 if ($lists) {
28 my $lists = $loader->find_class('lists');
29 my $users = $loader->find_class('users');
30 my $user_list = $loader->find_class('user_list');
31 foreach my $list ($lists->retrieve_all) {
32 print $list->name,"\n";
33 foreach my $user_on_list ($user_list->search(list_id => $list->id)) {
34 my $user = $users->retrieve( id => $user_on_list->user_id );
35 print "\t",$user->full_name," <", $user->email, ">\n";
36 }
37 }
38 } else {
39 die "$0: unknown command";
40 }
41
42

Properties

Name Value
svn:executable

  ViewVC Help
Powered by ViewVC 1.1.26