X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=rt%2Fetc%2Fupgrade%2Fgenerate-rtaddressregexp.in;h=9a097e93ac3ec3c3352360ac6607175966b0b77e;hp=a6262dffef4887bbfb342dea8c58907f8e5fabee;hb=de9d037528895f7151a9aead6724ce2df95f9586;hpb=73a6a80a9ca5edbd43d139b7cb25bfee4abfd35e diff --git a/rt/etc/upgrade/generate-rtaddressregexp.in b/rt/etc/upgrade/generate-rtaddressregexp.in index a6262dffe..9a097e93a 100644 --- a/rt/etc/upgrade/generate-rtaddressregexp.in +++ b/rt/etc/upgrade/generate-rtaddressregexp.in @@ -3,7 +3,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2017 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) @@ -46,18 +46,15 @@ # 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(); if (my $re = RT->Config->Get('RTAddressRegexp')) { print "No need to use this script, you already have RTAddressRegexp set to $re\n"; @@ -86,7 +83,7 @@ for my $domain (sort keys %merged) { } } if (@addresses > 1) { - push @domains, "(?:".join("|", @addresses).")\Q\@".$domain."\E"; + push @domains, "(?:".join("|", @addresses).")\Q\@$domain\E"; } else { push @domains, "$addresses[0]\Q\@$domain\E"; }