[Rt-devel] Newbie programming questino

Matthew Keller kellermg at potsdam.edu
Sat Feb 24 23:39:22 EST 2007


SearchBuilder not SearcBuilder

On 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: http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-devel



More information about the Rt-devel mailing list