#! /usr/bin/perl -w
# test-perl - Use the CORBA-ORBit perl package to remote control SandUhr

use vars qw($IDL_PATH);

BEGIN {
    my $datadir = `gnome-config --datadir`;
    chomp $datadir;
    $IDL_PATH = "$datadir/idl";
}

use CORBA::ORBit idl_path => $IDL_PATH, idl => [ "sanduhr.idl" ];
use GNOME::GNORBA;

GNOME::GNORBA::init();

$factory = GNOME::GOAD::activate (id => 'GOADID:SandUhr:TimerFactory:1.0');
defined $factory or die "Cannot activate SandUhr:TimerFactory\n";

$timer = $factory->CreateTimer ("16:00", "Hund fttern damit er nicht jault");
print $timer->_get_Message, "\n";
print $timer->_get_TimeSpec, "\n";
$timer->_set_TimeSpec("Hpf");
