[Rt-devel] Re: Problem (and workaround) with Handle.pm in DBIx::SearchQuery used by RT

Stephen Turner sturner at MIT.EDU
Fri Dec 17 11:46:12 EST 2004

At Tuesday 12/14/2004 04:53 PM, Jesse Vincent wrote:

>Replicating the failure with a tiny DBI script that has the bare minimum
>code.  The current guess is that it's something with our $sth parameter

I wasn't able to replicate the failure with a DBI script (included below). 
In fact, the insert worked as expected. I can't come up with an idea for 
why this would behave differently from the web interface.

One other test I did was to type in these URLs directly into the browser:



The first one failed, the second succeeded - probably to be expected.


#!/bin/perl -I $ENV{RT_HOME}/lib

     die "RT_HOME environment variable is not defined"
         if ! defined $ENV{RT_HOME};

use lib $ENV{RT_HOME}."/etc";
use lib $ENV{RT_HOME}."/lib";

use RT::Interface::CLI qw (CleanEnv GetCurrentUser);
use RT::User;
use RT::Interface::Web;

# Do RT API initialization:


my ($val, $msg) = ();

my $UserObj = new RT::User(RT::SystemUser);
($val, $msg) = $UserObj->Create( Name => 'pedro',
                                     EmailAddress => 'pedro at mets.com',
                                     RealName => 'Pedro Martinez',

print "Attempt 1 (no comment): $msg\n";

$UserObj = new RT::User(RT::SystemUser);
($val, $msg) = $UserObj->Create( Name => 'pedro2',
                                  EmailAddress => 'pedro at redsox.com',
                                  RealName => 'Pedro Martinez',
                                  Comments => 'Gone'

print "Attempt 2 (comment): $msg\n";



More information about the Rt-devel mailing list