[rt-users] Custom Conditions

Ruslan U. Zakirov cubic at acronis.ru
Fri Mar 5 08:46:31 EST 2004


		Hello.
I'm not a saint,
I just insane,
but use an easy way :)
perldoc and vi could help a lot :)

In custom condition code you can use:
	$self->TicketObj
	$self->TransactionObj
	$self->ScripObj

then
perldoc /opt/rt3/lib/RT/Ticket.pm
perldoc /opt/rt3/lib/RT/Ticket_Overlay.pm
perldoc /opt/rt3/lib/RT/Tickets.pm
perldoc /opt/rt3/lib/RT/Tickets_Overlay.pm
perldoc /opt/rt3/lib/RT/Transaction.pm
perldoc /opt/rt3/lib/RT/Transaction_Overlay.pm
perldoc /opt/rt3/lib/RT/Transactions.pm
perldoc /opt/rt3/lib/RT/Transactions_Overlay.pm

Isn't it enought???
		Best regards. Ruslan.
Andy Harrison wrote:
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> On Fri, 05 Mar 2004 13:22:51 +0000, Matthew Cheale wrote
> Subject: "Re: [rt-users] Custom Conditions"
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> 
>> The trouble being that without a definitive list of objects and their 
>> methods it makes it tricky to use...
> 
> 
> That's putting it mildly.  :)
> 
> Here's a trick I got from one of the saints.
> 
> I was using it in a template to see what was available.
> 
> Template Content:
> 
>  {
>  require '/tmp/Symbol/Methods.pm';
>  print "::::\n";
>  foreach ( Symbol::Methods::probesym( ref $Ticket ) ) { print; print "\n"; } 
>  print "::::\n";
>  }
> 
> Then you could do:  my $Transactions = $Ticket->Transactions and ref
> $Transactions to see the next level.
> 
> # cat /tmp/Symbol/Methods.pm 
> package Symbol::Methods;
> 
> sub probesym {
>   my $pkg  = shift || 'main';
>   my $seen = shift || { };
> 
>   my @subs;
> 
>   foreach my $class ( @{ $pkg . '::ISA' } ) {
>     push @subs, probesym($class, $seen)
>       unless $seen{$class}++;
>   }
> 
>   push @subs,
>     grep UNIVERSAL::can( $pkg, $_ ), 
>     values %{ $pkg . '::' }; 
> 
>   @subs;
> }
> 
> 1;
> 




More information about the rt-users mailing list