[rt-users] TicketObj

Mathew Snyder theillien at yahoo.com
Sun Jun 17 05:32:14 EDT 2007

I'm trying to rewrite part of a script to use the RT::Date module as opposed to
something else like Date::Simple.  However, I'm not sure how to start it.  I'm
using this to test things:


use warnings;
use strict;
use lib '/usr/local/rt-3.6.1/lib';
use lib '/usr/local/rt-3.6.1/local/lib';
use RT;
use RT::Tickets;
use RT::Users;
use RT::Date;
use RT::Action::Generic;


sub try {
        my $self = shift;
        my $due = $self->TicketObj->DueObj();
        print $due->Unix() . "\n";


But I keep getting "Can't call method "TicketObj" on an undefined value at
/usr/local/bin/date_test.pl line 18."  I suspect it has something to do with
$self not being initialized.  This is the first time I've tried doing things
this way so I'm not sure how to do it.  Any help will be appreciated.


Keep up with me and what I'm up to: http://theillien.blogspot.com

More information about the rt-users mailing list