<div dir="ltr">The following, very simply code returns an error:<div><div><br></div><div>#!/usr/bin/perl</div><div><br></div><div><div>use warnings;</div><div>use strict;</div><div>use lib '/opt/rt4/lib';</div><div>
use lib '/opt/rt4/local/lib';</div></div><div><br></div><div># Test basic connection to RT</div><div>my $queues = RT::Queues->new( RT->SystemUser );</div><div>while ( my $queue = $queues->Next ) {</div><div>
print $queue->Name . "\n";</div><div>}</div><div><br></div><div><br></div><div>The error:</div><div><div>RT::Queues=HASH(0x43326e0) was created without a CurrentUser at /opt/rt4/lib/RT/SearchBuilder.pm line 84.</div>
<div><span class="" style="white-space:pre"> </span>RT::SearchBuilder::_Init(RT::Queues=HASH(0x43326e0), undef) called at /opt/rt4/lib/RT/Queues.pm line 88</div><div><span class="" style="white-space:pre"> </span>RT::Queues::_Init(RT::Queues=HASH(0x43326e0), undef) called at /usr/local/share/perl5/DBIx/SearchBuilder.pm line 95</div>
<div><span class="" style="white-space:pre"> </span>DBIx::SearchBuilder::new("RT::Queues", undef) called at ./<a href="http://cc_ticket_alert.pl">cc_ticket_alert.pl</a> line 34</div></div><div><br></div><div><br>
</div><div>If, instead of creating $queues the way above, I create it like so:</div><div><br></div><div>my $queues = new RT::Queues( "RT::SystemUser" );</div><div><br></div><div>and adding </div><div><br></div>
<div>
use RT::Queues;</div><div><br></div><div>it will run, but not return anything.</div><div><br></div><div>Any idea what I'm 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="background-color:rgb(255,255,255);font-family:arial,sans-serif;font-size:13px;line-height:18px">We'll get along much better once you accept that you're wrong and neither am I." - Me</span></div>
</div>
</div></div>