Newbie programming questino

So,
I need to right a query that is like a regular query, but also includes the
original problem description.

From a previous rt-users query, it was pointed out that I need to write my
own.

I have done quite a bit of PERL, but no RT PERL.

I bought the RT book and in the basic example (Pg 141).

So when I run it from within PERL, I get

Can’t locate DBIx/SearcBuilder/Handle.pm in @INC (…

I tried adding use lib and unshift below.

Can I get some help to get started?

Should I be running these from within the RT dir (ie local) instead of doing
independent queries?

What I am looking for is .

An example to get started.

Bryon

#!/usr/bin/perl

use lib ‘/opt/rt3/lib’;

unshift(@INC,’/opt/rt3/lib’);

package Tkt;

package RT;

use DBIx::SearcBuilder::Handle;

my $handle = DBIx::SearchBuilder::Handle->new();

$handle->Connect(

    Driver          => 'mysql',

    Database        => 'rt3',

    Host            => 'bogus',

    User            => 'bogus',

    Password        => 'bogus'

);

print $handle->FetchResult(“SELECT sysdate FROM dual”);

SearchBuilder not SearcBuilderOn Sat, 2007-02-24 at 09:25 -0500, Bryon Beilman wrote:

So,
I need to right a query that is like a regular query, but also
includes the original problem description.

From a previous rt-users query, it was pointed out that I need to
write my own.

I have done quite a bit of PERL, but no RT PERL.

I bought the RT book and in the basic example (Pg 141).

So when I run it from within PERL, I get

Can’t locate DBIx/SearcBuilder/Handle.pm in @INC (…

I tried adding use lib and unshift below…

Can I get some help to get started?

Should I be running these from within the RT dir (ie local) instead of
doing independent queries?

What I am looking for is …

An example to get started.

Bryon

#!/usr/bin/perl

use lib ‘/opt/rt3/lib’;

unshift(@INC,‘/opt/rt3/lib’);

package Tkt;

package RT;

use DBIx::SearcBuilder::Handle;

my $handle = DBIx::SearchBuilder::Handle->new();

$handle->Connect(

    Driver          => 'mysql',

    Database        => 'rt3',

    Host            => 'bogus',

    User            => 'bogus',

    Password        => 'bogus'

);

print $handle->FetchResult(“SELECT sysdate FROM dual”);


List info: The rt-devel Archives

Thanks,
that worked.
I guess I should have used

use DBIx::ImaDoofus::Typo;

Thanks for the code check. I can now run the query.

Bryon