<div dir="ltr">Trying to figure out why I keep getting various "Subroutine * redefined at /opt/rt4/lib/RT/URI.pm..." error.<div><br></div><div>All I'm trying to do right now is print out a list of new, unowned tickets from a queue.</div>
<div><br></div><div>Script:</div><div>#!/usr/bin/perl</div><div><br></div><div><div>use warnings;</div><div>use strict;</div><div>use lib '/opt/rt4/lib/RT';</div><div>use lib '/opt/rt4/local/lib';</div><div>
use RT::Tickets;</div><div>use RT::Users;</div><div><br></div><div>my $unacted_tickets;</div><div>my $tix = new RT::Tickets("RT::SystemUser");</div><div>$tix->FromSQL('Queue = "Service Desk" AND Status = "new" AND Owner = "Nobody"');</div>
<div><br></div><div>while (my $ticket = $tix->Next) {</div><div> my $diff = time - (str2time($ticket->Created) - 18000);</div><div> print $ticket->id . ": " . (str2time($ticket->Created) - 18000) . "\n";</div>
<div> print "time: " . time() . "\n";</div><div> print "diff: " . $diff . "\n";</div><div> print "diff adjusted: " . $diff/60 . "\n";</div><div>
}<br></div><div><br></div><div>exit;</div><div><br></div><div>Output:</div><div><div>Subroutine new redefined at /opt/rt4/lib/RT/URI.pm line 83.</div><div>Subroutine CanonicalizeURI redefined at /opt/rt4/lib/RT/URI.pm line 102.</div>
<div>Subroutine FromObject redefined at /opt/rt4/lib/RT/URI.pm line 123.</div><div>Subroutine FromURI redefined at /opt/rt4/lib/RT/URI.pm line 142.</div><div>Subroutine _GetResolver redefined at /opt/rt4/lib/RT/URI.pm line 186.</div>
<div>Subroutine Scheme redefined at /opt/rt4/lib/RT/URI.pm line 218.</div><div>Subroutine URI redefined at /opt/rt4/lib/RT/URI.pm line 231.</div><div>Subroutine Object redefined at /opt/rt4/lib/RT/URI.pm line 245.</div><div>
Subroutine IsLocal redefined at /opt/rt4/lib/RT/URI.pm line 260.</div><div>Subroutine AsHREF redefined at /opt/rt4/lib/RT/URI.pm line 273.</div><div>Subroutine Resolver redefined at /opt/rt4/lib/RT/URI.pm line 285.</div>
<div>
Subroutine AsString redefined at /opt/rt4/lib/RT/URI.pm line 296.</div><div>Can't call method "error" on an undefined value at /opt/rt4/lib/RT/Tickets.pm line 3001.</div></div><div><br></div><div>It's been a while since I've written scripts that use the RT API so I don't know if things have changed in how the environment is set up. What am I doing wrong?</div>
<div><br></div><div>-Mathew<br><br>"When you do things right, people won't be sure you've done anything at all." - God; Futurama<div><br></div><div>"<span style="line-height:18px;font-size:13px;font-family:arial,sans-serif">We'll get along much better once you accept that you're wrong and neither am I." - Me</span></div>
</div>
</div></div>