[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Omaha.pm] RE: event_notify.pl is done.



-laugh-  Ya. I think I'm going to delegate out the methods for my "Core" class this week... I've already designed the interface.


use Core;

my $c = Core->new();
$c->do('everything');
$c->be(what => 'all things',
       to   => 'all people');
$c->close_tickets('*');
$c->get_fame;
$c->get_fortune;
$c->dominate(globe => 'earth');
$c->set_hunger(scope => 'global', value => 0);
$c->set_peace(scope => 'global', value => 1);
$c->cure(ailment => 'cancer');
$c->retire;

j


> -----Original Message-----
> The event_notify.pl is done.  Here it is:
>
>
> #!/usr/bin/perl
>
> use strict;
> use Control::Globals;
> use Control::Hotels;
> use Model::omares::crs::L_EventNotify;
> use Omni::DB;
>
>
> my $dbh     = Omni::DB::connect_test_with_pw;
> my $Globals = new Control::Globals;
> $Globals->add('dbh',$dbh);
> $Globals->add('defaults',1);
>
> my $h = new Control::Hotels(Globals=>$Globals);
>
> $Globals->add('Hotels',$h);
>
> while (1) {
>   my $L_EN = new Model::omares::crs::L_EventNotify(Globals=>$Globals);
>   $L_EN->load(source=>"event_notify");
>   $L_EN->process;
>   sleep 30;
> }
>
>
> $dbh->disconnect;
>
> exit;
>
>
> Now I just have to finish the process() method.
>
> Sean Baker