#!/usr/bin/perl -w
# $File: //depot/RT/104/html/Callbacks/Sync104HRMS/autohandler/401.pl $ $Author: autrijus $
# $Revision: #2 $ $Change: 7453 $ $DateTime: 2003/08/11 15:38:03 $

use lib qw(/opt/rt3/lib /opt/rt3/local/lib);
use RT;
use DBIx::SearchBuilder::Record;
use RT::Interface::CLI qw(CleanEnv GetCurrentUser GetMessageContent loc);
CleanEnv(); RT::LoadConfig(); RT::Init(); RT::DropSetGIDPermissions();
my $CurrentUser = GetCurrentUser();

$|++;
main();

sub main {
    my ($Force, $m, $r, $DSN, $DBUser, $DBPass);
    $Force = 1;
    my $code = do { local $/; open my $src, 'Default'; <$src>; };
    $code =~ /<%PERL>(.*)<\/%PERL>/s or die $!;
    $code = $1;
    $code =~ s/# Check for updates/\$Info = sub { print "\@_\\n" }; #/;
    eval $code;
    die $@ if $@;
}
