RT 4.2.11, ticket#13852
[freeside.git] / rt / etc / upgrade / split-out-cf-categories.in
index d7dd117..6faf29c 100644 (file)
 # those contributions and any derivatives thereof.
 #
 # END BPS TAGGED BLOCK }}}
+use 5.10.1;
 use strict;
 use warnings;
 
 use lib "@LOCAL_LIB_PATH@";
 use lib "@RT_LIB_PATH@";
 
-use RT;
-RT::LoadConfig();
-RT->Config->Set('LogToScreen' => 'debug');
-RT::Init();
-
-$| = 1;
+use RT::Interface::CLI qw(Init);
+Init();
 
 $RT::Handle->BeginTransaction();
 
@@ -168,4 +165,4 @@ while (my $cf  = $CFs->Next ) {
 }
 
 $RT::Handle->Commit;
-print "No custom fields with categories found\n" unless $seen;
\ No newline at end of file
+print "No custom fields with categories found\n" unless $seen;