[Rt-commit] rt branch, 3.8/perlcritic, updated. rt-3.8.10-40-gad60f47

Alex Vandiver alexmv at bestpractical.com
Thu Jun 30 20:43:01 EDT 2011


The branch, 3.8/perlcritic has been updated
       via  ad60f472a2a83b330b9b9c2afb029df55c89220a (commit)
       via  dc55108f60facb0233cb93b23b2e11276e48f119 (commit)
       via  7c6f40c3c08fdf03c5b604d1ccbef80592f30a7a (commit)
      from  f0e0be521cd7f90a5ed8008757e7ff875fb4e787 (commit)

Summary of changes:
 bin/rt-mailgate.in                                 |    2 +-
 bin/rt.in                                          |    8 ++--
 lib/RT.pm.in                                       |    8 ++--
 lib/RT/ACE_Overlay.pm                              |    2 +-
 lib/RT/ACL_Overlay.pm                              |    2 +-
 lib/RT/Attachment_Overlay.pm                       |   15 +++---
 lib/RT/Attributes_Overlay.pm                       |    2 +-
 lib/RT/Condition/BeforeDue.pm                      |    2 +-
 lib/RT/Config.pm                                   |    6 +-
 lib/RT/Crypt/GnuPG.pm                              |   46 ++++++++++----------
 lib/RT/CurrentUser.pm                              |    2 +-
 lib/RT/CustomField_Overlay.pm                      |    2 +-
 lib/RT/Date.pm                                     |   29 ++++++------
 lib/RT/EmailParser.pm                              |    4 +-
 lib/RT/Group_Overlay.pm                            |    4 +-
 lib/RT/Groups_Overlay.pm                           |    2 +-
 lib/RT/Handle.pm                                   |   20 ++++----
 lib/RT/Interface/CLI.pm                            |    2 +-
 lib/RT/Interface/Email.pm                          |    2 +-
 lib/RT/Interface/Email/Auth/MailFrom.pm            |    2 +-
 lib/RT/Interface/Web.pm                            |    8 ++--
 lib/RT/Links_Overlay.pm                            |    2 +-
 lib/RT/Queue_Overlay.pm                            |    2 +-
 lib/RT/Record.pm                                   |   12 +++---
 lib/RT/Scrips_Overlay.pm                           |    2 +-
 lib/RT/Shredder/POD.pm                             |    6 +-
 lib/RT/Shredder/Plugin.pm                          |    4 +-
 lib/RT/Shredder/Record.pm                          |    2 +-
 lib/RT/StyleGuide.pod                              |    2 +-
 lib/RT/System.pm                                   |    2 +-
 lib/RT/Template_Overlay.pm                         |    2 +-
 lib/RT/Templates_Overlay.pm                        |    2 +-
 lib/RT/Test.pm                                     |   36 ++++++++--------
 lib/RT/Ticket_Overlay.pm                           |   38 ++++++++--------
 lib/RT/Tickets_Overlay.pm                          |    9 ++--
 lib/RT/Transaction_Overlay.pm                      |   14 +++---
 lib/RT/Users_Overlay.pm                            |    2 +-
 sbin/rt-setup-database.in                          |    4 +-
 sbin/rt-shredder.in                                |    4 +-
 share/html/Admin/Elements/ListGlobalCustomFields   |    2 +-
 share/html/Admin/Elements/QueueRightsForUser       |    2 +-
 share/html/Admin/Elements/SelectGroups             |    2 +-
 share/html/Admin/Elements/SelectModifyGroup        |    2 +-
 share/html/Admin/Elements/SelectModifyQueue        |    2 +-
 share/html/Admin/Elements/SelectModifyUser         |    2 +-
 share/html/Admin/Elements/SelectNewGroupMembers    |    4 +-
 share/html/Admin/Elements/SelectRights             |    4 +-
 share/html/Admin/Elements/SelectUsers              |    2 +-
 share/html/Admin/Global/Template.html              |    2 +-
 share/html/Admin/Groups/History.html               |    2 +-
 share/html/Admin/Groups/Members.html               |    2 +-
 share/html/Admin/Queues/CustomField.html           |    2 +-
 share/html/Admin/Queues/History.html               |    2 +-
 share/html/Admin/Queues/People.html                |    6 +-
 share/html/Admin/Queues/Scrips.html                |    2 +-
 share/html/Admin/Queues/Template.html              |    2 +-
 share/html/Admin/Queues/Templates.html             |    2 +-
 share/html/Admin/Queues/index.html                 |    2 +-
 .../Admin/Tools/Shredder/Elements/PluginArguments  |    2 +-
 .../html/Admin/Tools/Shredder/Elements/PluginHelp  |    2 +-
 .../Admin/Tools/Shredder/Elements/SelectPlugin     |    2 +-
 share/html/Admin/Tools/Shredder/index.html         |    8 ++--
 share/html/Admin/Users/History.html                |    2 +-
 share/html/Admin/Users/Modify.html                 |    2 +-
 share/html/Admin/Users/MyRT.html                   |    2 +-
 share/html/Dashboards/Queries.html                 |    2 +-
 share/html/Elements/ScrubHTML                      |    2 +-
 share/html/Elements/SelectQueue                    |    4 +-
 share/html/Elements/SelectStatus                   |    2 +-
 share/html/Elements/SelectTicketSortBy             |    2 +-
 share/html/Install/Initialize.html                 |    4 +-
 share/html/Install/index.html                      |    2 +-
 share/html/NoAuth/css/dhandler                     |    2 +-
 share/html/REST/1.0/Forms/attachment/default       |    2 +-
 share/html/REST/1.0/Forms/group/customfields       |    2 +-
 share/html/REST/1.0/Forms/group/default            |    2 +-
 share/html/REST/1.0/Forms/group/ns                 |    2 +-
 share/html/REST/1.0/Forms/queue/customfields       |    2 +-
 share/html/REST/1.0/Forms/queue/default            |    2 +-
 share/html/REST/1.0/Forms/queue/ns                 |    2 +-
 share/html/REST/1.0/Forms/queue/ticketcustomfields |    2 +-
 share/html/REST/1.0/Forms/ticket/attachments       |    4 +-
 share/html/REST/1.0/Forms/ticket/comment           |    2 +-
 share/html/REST/1.0/Forms/ticket/default           |   16 +++---
 share/html/REST/1.0/Forms/ticket/history           |    6 +-
 share/html/REST/1.0/Forms/ticket/links             |    6 +-
 share/html/REST/1.0/Forms/ticket/merge             |    4 +-
 share/html/REST/1.0/Forms/ticket/take              |    2 +-
 share/html/REST/1.0/Forms/transaction/default      |    6 +-
 share/html/REST/1.0/Forms/user/default             |    2 +-
 share/html/REST/1.0/Forms/user/ns                  |    2 +-
 share/html/REST/1.0/search/ticket                  |    2 +-
 share/html/REST/1.0/ticket/comment                 |    2 +-
 share/html/REST/1.0/ticket/link                    |    2 +-
 share/html/REST/1.0/ticket/merge                   |    2 +-
 share/html/Search/Elements/DisplayOptions          |    2 +-
 share/html/Search/Elements/ResultsRSSView          |    2 +-
 share/html/Search/Elements/SelectGroup             |    2 +-
 share/html/Search/Simple.html                      |    2 +-
 share/html/SelfService/Display.html                |    4 +-
 share/html/Ticket/Attachment/WithHeaders/dhandler  |    2 +-
 share/html/Ticket/Attachment/dhandler              |    2 +-
 share/html/Ticket/Create.html                      |    2 +-
 share/html/Ticket/Display.html                     |    2 +-
 share/html/Ticket/Elements/ShowHistory             |    2 +-
 share/html/Ticket/ShowEmailRecord.html             |    2 +-
 share/html/User/Groups/Members.html                |    2 +-
 share/html/index.html                              |    2 +-
 t/00-mason-syntax.t                                |    2 +-
 t/clicky.t                                         |    6 +-
 t/mail/crypt-gnupg.t                               |    2 +-
 t/mail/gateway.t                                   |    2 +-
 t/shredder/02group_member.t                        |    2 +-
 t/shredder/03plugin.t                              |    6 +-
 t/shredder/03plugin_summary.t                      |    2 +-
 t/shredder/03plugin_tickets.t                      |    8 ++--
 t/shredder/03plugin_users.t                        |    2 +-
 t/shredder/utils.pl                                |    2 +-
 t/ticket/link_search.t                             |   10 ++--
 t/ticket/sort-by-custom-ownership.t                |    8 ++--
 t/ticket/sort_by_cf.t                              |   16 +++---
 121 files changed, 285 insertions(+), 286 deletions(-)

- Log -----------------------------------------------------------------
commit 7c6f40c3c08fdf03c5b604d1ccbef80592f30a7a
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Thu Jun 30 17:02:59 2011 -0400

    Fix "my $x = ... if ..." traps

diff --git a/bin/rt.in b/bin/rt.in
index 8e933b4..067794e 100755
--- a/bin/rt.in
+++ b/bin/rt.in
@@ -1222,7 +1222,7 @@ sub submit {
 sub Form::parse {
     my $state = 0;
     my @forms = ();
-    my @lines = split /\n/, $_[0] if $_[0];
+    my @lines = $_[0] ? (split /\n/, $_[0]) : ();
     my ($c, $o, $k, $e) = ("", [], {}, "");
 
     LINE:
diff --git a/lib/RT/System.pm b/lib/RT/System.pm
index 7a5bff0..4d21d8a 100755
--- a/lib/RT/System.pm
+++ b/lib/RT/System.pm
@@ -140,7 +140,7 @@ should be called during server startup, not at runtime.
 =cut
 
 sub AddRights {
-    my $self = shift if ref $_[0] or $_[0] eq __PACKAGE__;
+    my $self = (ref $_[0] or $_[0] eq __PACKAGE__) ? shift : undef;
     my %new = @_;
     $RIGHTS = { %$RIGHTS, %new };
     %RT::ACE::LOWERCASERIGHTNAMES = ( %RT::ACE::LOWERCASERIGHTNAMES,
diff --git a/lib/RT/Tickets_Overlay.pm b/lib/RT/Tickets_Overlay.pm
index d3a3599..7887bf7 100755
--- a/lib/RT/Tickets_Overlay.pm
+++ b/lib/RT/Tickets_Overlay.pm
@@ -589,8 +589,7 @@ sub _StringLimit {
         && lc($op) ne 'is' && lc($op) ne 'is not'
         && RT->Config->Get('DatabaseType') eq 'Oracle'
     ) {
-        my $negative = 1 if $op eq '!=' || $op =~ /^NOT\s/;
-        $op = $negative? 'IS NOT': 'IS';
+        $op = ($op eq '!=' || $op =~ /^NOT\s/) ? 'IS NOT': 'IS';
         $value = 'NULL';
     }
 

commit dc55108f60facb0233cb93b23b2e11276e48f119
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Thu Jun 30 19:29:02 2011 -0400

    checkpoint

diff --git a/bin/rt-mailgate.in b/bin/rt-mailgate.in
index c1a57cb..cb05e58 100755
--- a/bin/rt-mailgate.in
+++ b/bin/rt-mailgate.in
@@ -78,7 +78,7 @@ unless ( $opts{'url'} ) {
     exit 1;
 }
 
-my $ua = new LWP::UserAgent;
+my $ua = LWP::UserAgent->new;
 $ua->cookie_jar( { file => $opts{'jar'} } ) if $opts{'jar'};
 
 my %args = (
diff --git a/bin/rt.in b/bin/rt.in
index 067794e..c30266a 100755
--- a/bin/rt.in
+++ b/bin/rt.in
@@ -98,7 +98,7 @@ my %config = (
     config_from_file($ENV{RTCONFIG} || ".rtrc"),
     config_from_env()
 );
-my $session = new Session("$HOME/.rt_sessions");
+my $session = Session->new("$HOME/.rt_sessions");
 my $REST = "$config{server}/REST/1.0";
 $no_strong_auth = 'switched off by externalauth=0'
     if defined $config{externalauth};
@@ -177,7 +177,7 @@ sub handler {
 
 sub shell {
     $|=1;
-    my $term = new Term::ReadLine 'RT CLI';
+    my $term = Term::ReadLine->new('RT CLI');
     while ( defined ($_ = $term->readline($prompt)) ) {
         next if /^#/ || /^\s*$/;
 
@@ -981,7 +981,7 @@ sub grant {
 sub submit {
     my ($uri, $content) = @_;
     my ($req, $data);
-    my $ua = new LWP::UserAgent(agent => "RT/3.0b", env_proxy => 1);
+    my $ua = LWP::UserAgent->new(agent => "RT/3.0b", env_proxy => 1);
     my $h = HTTP::Headers->new;
 
     # Did the caller specify any data to send with the request?
diff --git a/lib/RT.pm.in b/lib/RT.pm.in
index d6dfda7..84b16b1 100755
--- a/lib/RT.pm.in
+++ b/lib/RT.pm.in
@@ -149,7 +149,7 @@ have not been set already.
 
 sub LoadConfig {
     require RT::Config;
-    $Config = new RT::Config;
+    $Config = RT::Config->new;
     $Config->LoadConfigs;
     require RT::I18N;
 
@@ -202,7 +202,7 @@ Get a database connection. See also </Handle>.
 
 sub ConnectToDatabase {
     require RT::Handle;
-    $Handle = new RT::Handle unless $Handle;
+    $Handle = RT::Handle->new unless $Handle;
     $Handle->Connect;
     return $Handle;
 }
@@ -502,11 +502,11 @@ sub InitSystemObjects {
 
     #RT's system user is a genuine database user. its id lives here
     require RT::CurrentUser;
-    $SystemUser = new RT::CurrentUser;
+    $SystemUser = RT::CurrentUser->new;
     $SystemUser->LoadByName('RT_System');
 
     #RT's "nobody user" is a genuine database user. its ID lives here.
-    $Nobody = new RT::CurrentUser;
+    $Nobody = RT::CurrentUser->new;
     $Nobody->LoadByName('Nobody');
 
     require RT::System;
diff --git a/lib/RT/Attachment_Overlay.pm b/lib/RT/Attachment_Overlay.pm
index 45a5ab6..c8a4952 100644
--- a/lib/RT/Attachment_Overlay.pm
+++ b/lib/RT/Attachment_Overlay.pm
@@ -157,7 +157,7 @@ sub Create {
         }
 
         foreach my $part ( $Attachment->parts ) {
-            my $SubAttachment = new RT::Attachment( $self->CurrentUser );
+            my $SubAttachment = RT::Attachment->new( $self->CurrentUser );
             my ($id) = $SubAttachment->Create(
                 TransactionId => $args{'TransactionId'},
                 Parent        => $id,
@@ -385,12 +385,11 @@ sub Quote {
 
 	if ($max>76) {
 	    require Text::Wrapper;
-	    my $wrapper=new Text::Wrapper
-		(
-		 columns => 70, 
-		 body_start => ($max > 70*3 ? '   ' : ''),
-		 par_start => ''
-		 );
+	    my $wrapper= Text::Wrapper->new(
+                columns => 70,
+                body_start => ($max > 70*3 ? '   ' : ''),
+                par_start => ''
+            );
 	    $body=$wrapper->wrap($body);
 	}
 
@@ -420,7 +419,7 @@ Returns MIME entity built from this attachment.
 sub ContentAsMIME {
     my $self = shift;
 
-    my $entity = new MIME::Entity;
+    my $entity = MIME::Entity->new;
     foreach my $header ($self->SplitHeaders) {
         my ($h_key, $h_val) = split /:/, $header, 2;
         $entity->head->add( $h_key, RT::Interface::Email::EncodeToMIME( String => $h_val ) );
diff --git a/lib/RT/Condition/BeforeDue.pm b/lib/RT/Condition/BeforeDue.pm
index d119ff0..26a1d5a 100755
--- a/lib/RT/Condition/BeforeDue.pm
+++ b/lib/RT/Condition/BeforeDue.pm
@@ -65,7 +65,7 @@ sub IsApplicable {
     }
     my $elapse = $e{'d'} * 24*60*60 + $e{'h'} * 60*60 + $e{'m'} * 60 + $e{'s'};
 
-    my $cur = new RT::Date( $RT::SystemUser );
+    my $cur = RT::Date->new( $RT::SystemUser );
     $cur->SetToNow();
     my $due = $self->TicketObj->DueObj;
     return (undef) if $due->Unix <= 0;
diff --git a/lib/RT/Config.pm b/lib/RT/Config.pm
index b51e14c..67bcecf 100644
--- a/lib/RT/Config.pm
+++ b/lib/RT/Config.pm
@@ -61,7 +61,7 @@ use File::Spec ();
 
     # get config object
     use RT::Config;
-    my $config = new RT::Config;
+    my $config = RT::Config->new;
     $config->LoadConfigs;
 
     # get or set option
@@ -140,7 +140,7 @@ our %META = (
             Description => 'Default queue',    #loc
             Callback    => sub {
                 my $ret = { Values => [], ValuesLabel => {}};
-                my $q = new RT::Queues($HTML::Mason::Commands::session{'CurrentUser'});
+                my $q = RT::Queues->new($HTML::Mason::Commands::session{'CurrentUser'});
                 $q->UnLimit;
                 while (my $queue = $q->Next) {
                     next unless $queue->CurrentUserHasRight("CreateTicket");
@@ -345,7 +345,7 @@ our %META = (
         WidgetArguments => {
             Description => 'Date format',                            #loc
             Callback => sub { my $ret = { Values => [], ValuesLabel => {}};
-                              my $date = new RT::Date($HTML::Mason::Commands::session{'CurrentUser'});
+                              my $date = RT::Date->new($HTML::Mason::Commands::session{'CurrentUser'});
                               $date->Set;
                               foreach my $value ($date->Formatters) {
                                  push @{$ret->{Values}}, $value;
diff --git a/lib/RT/Crypt/GnuPG.pm b/lib/RT/Crypt/GnuPG.pm
index 314e6cc..89450fd 100644
--- a/lib/RT/Crypt/GnuPG.pm
+++ b/lib/RT/Crypt/GnuPG.pm
@@ -352,13 +352,13 @@ my %supported_opt = map { $_ => 1 } qw(
 );
 
 # DEV WARNING: always pass all STD* handles to GnuPG interface even if we don't
-# need them, just pass 'new IO::Handle' and then close it after safe_run_child.
+# need them, just pass 'IO::Handle->new' and then close it after safe_run_child.
 # we don't want to leak anything into FCGI/Apache/MP handles, this break things.
 # So code should look like:
 #        my $handles = GnuPG::Handles->new(
-#            stdin  => ($handle{'stdin'}  = new IO::Handle),
-#            stdout => ($handle{'stdout'} = new IO::Handle),
-#            stderr => ($handle{'stderr'}  = new IO::Handle),
+#            stdin  => ($handle{'stdin'}  = IO::Handle->new),
+#            stdout => ($handle{'stdout'} = IO::Handle->new),
+#            stderr => ($handle{'stderr'} = IO::Handle->new),
 #            ...
 #        );
 
@@ -433,7 +433,7 @@ sub SignEncryptRFC3156 {
         @_
     );
 
-    my $gnupg = new GnuPG::Interface;
+    my $gnupg = GnuPG::Interface->new;
     my %opt = RT->Config->Get('GnuPGOptions');
 
     # handling passphrase in GnuPGOptions
@@ -615,7 +615,7 @@ sub _SignEncryptTextInline {
     );
     return unless $args{'Sign'} || $args{'Encrypt'};
 
-    my $gnupg = new GnuPG::Interface;
+    my $gnupg = GnuPG::Interface->new;
     my %opt = RT->Config->Get('GnuPGOptions');
 
     # handling passphrase in GnupGOptions
@@ -682,7 +682,7 @@ sub _SignEncryptTextInline {
         return %res;
     }
 
-    $entity->bodyhandle( new MIME::Body::File $tmp_fn );
+    $entity->bodyhandle( MIME::Body::File->new( $tmp_fn ) );
     $entity->{'__store_tmp_handle_to_avoid_early_cleanup'} = $tmp_fh;
 
     return %res;
@@ -703,7 +703,7 @@ sub _SignEncryptAttachmentInline {
     );
     return unless $args{'Sign'} || $args{'Encrypt'};
 
-    my $gnupg = new GnuPG::Interface;
+    my $gnupg = GnuPG::Interface->new;
     my %opt = RT->Config->Get('GnuPGOptions');
 
     # handling passphrase in GnupGOptions
@@ -779,7 +779,7 @@ sub _SignEncryptAttachmentInline {
             Disposition => 'attachment',
         );
     } else {
-        $entity->bodyhandle( new MIME::Body::File $tmp_fn );
+        $entity->bodyhandle( MIME::Body::File->new( $tmp_fn ) );
         $entity->effective_type('application/octet-stream');
         $entity->head->mime_attr( $_ => "$filename.pgp" )
             foreach (qw(Content-Type.name Content-Disposition.filename));
@@ -805,7 +805,7 @@ sub SignEncryptContent {
     );
     return unless $args{'Sign'} || $args{'Encrypt'};
 
-    my $gnupg = new GnuPG::Interface;
+    my $gnupg = GnuPG::Interface->new;
     my %opt = RT->Config->Get('GnuPGOptions');
 
     # handling passphrase in GnupGOptions
@@ -1092,7 +1092,7 @@ sub VerifyInline { return DecryptInline( @_ ) }
 sub VerifyAttachment {
     my %args = ( Data => undef, Signature => undef, Top => undef, @_ );
 
-    my $gnupg = new GnuPG::Interface;
+    my $gnupg = GnuPG::Interface->new;
     my %opt = RT->Config->Get('GnuPGOptions');
     $opt{'digest-algo'} ||= 'SHA1';
     $gnupg->options->hash_init(
@@ -1146,7 +1146,7 @@ sub VerifyAttachment {
 sub VerifyRFC3156 {
     my %args = ( Data => undef, Signature => undef, Top => undef, @_ );
 
-    my $gnupg = new GnuPG::Interface;
+    my $gnupg = GnuPG::Interface->new;
     my %opt = RT->Config->Get('GnuPGOptions');
     $opt{'digest-algo'} ||= 'SHA1';
     $gnupg->options->hash_init(
@@ -1199,7 +1199,7 @@ sub DecryptRFC3156 {
         @_
     );
 
-    my $gnupg = new GnuPG::Interface;
+    my $gnupg = GnuPG::Interface->new;
     my %opt = RT->Config->Get('GnuPGOptions');
 
     # handling passphrase in GnupGOptions
@@ -1261,7 +1261,7 @@ sub DecryptRFC3156 {
     }
 
     seek $tmp_fh, 0, 0;
-    my $parser = new RT::EmailParser;
+    my $parser = RT::EmailParser->new;
     my $decrypted = $parser->ParseMIMEEntityFromFileHandle( $tmp_fh, 0 );
     $decrypted->{'__store_link_to_object_to_avoid_early_cleanup'} = $parser;
     $args{'Top'}->parts( [] );
@@ -1277,7 +1277,7 @@ sub DecryptInline {
         @_
     );
 
-    my $gnupg = new GnuPG::Interface;
+    my $gnupg = GnuPG::Interface->new;
     my %opt = RT->Config->Get('GnuPGOptions');
 
     # handling passphrase in GnuPGOptions
@@ -1373,7 +1373,7 @@ sub DecryptInline {
     }
 
     seek $tmp_fh, 0, 0;
-    $args{'Data'}->bodyhandle( new MIME::Body::File $tmp_fn );
+    $args{'Data'}->bodyhandle( MIME::Body::File->new( $tmp_fn ) );
     $args{'Data'}->{'__store_tmp_handle_to_avoid_early_cleanup'} = $tmp_fh;
     return %res;
 }
@@ -1436,7 +1436,7 @@ sub DecryptAttachment {
         @_
     );
 
-    my $gnupg = new GnuPG::Interface;
+    my $gnupg = GnuPG::Interface->new;
     my %opt = RT->Config->Get('GnuPGOptions');
 
     # handling passphrase in GnuPGOptions
@@ -1469,7 +1469,7 @@ sub DecryptAttachment {
     );
     return %res unless $res_fh;
 
-    $args{'Data'}->bodyhandle( new MIME::Body::File $res_fn );
+    $args{'Data'}->bodyhandle( MIME::Body::File->new( $res_fn ) );
     $args{'Data'}->{'__store_tmp_handle_to_avoid_early_cleanup'} = $res_fh;
 
     my $filename = $args{'Data'}->head->recommended_filename;
@@ -1487,7 +1487,7 @@ sub DecryptContent {
         @_
     );
 
-    my $gnupg = new GnuPG::Interface;
+    my $gnupg = GnuPG::Interface->new;
     my %opt = RT->Config->Get('GnuPGOptions');
 
     # handling passphrase in GnupGOptions
@@ -2076,7 +2076,7 @@ sub GetKeysInfo {
         return (exit_code => 0) unless $force;
     }
 
-    my $gnupg = new GnuPG::Interface;
+    my $gnupg = GnuPG::Interface->new;
     my %opt = RT->Config->Get('GnuPGOptions');
     $opt{'digest-algo'} ||= 'SHA1';
     $opt{'with-colons'} = undef; # parseable format
@@ -2275,7 +2275,7 @@ sub _ParseDate {
 sub DeleteKey {
     my $key = shift;
 
-    my $gnupg = new GnuPG::Interface;
+    my $gnupg = GnuPG::Interface->new;
     my %opt = RT->Config->Get('GnuPGOptions');
     $gnupg->options->hash_init(
         _PrepareGnuPGOptions( %opt ),
@@ -2323,7 +2323,7 @@ sub DeleteKey {
 sub ImportKey {
     my $key = shift;
 
-    my $gnupg = new GnuPG::Interface;
+    my $gnupg = GnuPG::Interface->new;
     my %opt = RT->Config->Get('GnuPGOptions');
     $gnupg->options->hash_init(
         _PrepareGnuPGOptions( %opt ),
@@ -2406,7 +2406,7 @@ properly (and false otherwise).
 
 
 sub Probe {
-    my $gnupg = new GnuPG::Interface;
+    my $gnupg = GnuPG::Interface->new;
     my %opt = RT->Config->Get('GnuPGOptions');
     $gnupg->options->hash_init(
         _PrepareGnuPGOptions( %opt ),
diff --git a/lib/RT/CustomField_Overlay.pm b/lib/RT/CustomField_Overlay.pm
index 92a05ec..a82921d 100755
--- a/lib/RT/CustomField_Overlay.pm
+++ b/lib/RT/CustomField_Overlay.pm
@@ -1293,7 +1293,7 @@ sub ValuesForObject {
     my $self = shift;
     my $object = shift;
 
-    my $values = new RT::ObjectCustomFieldValues($self->CurrentUser);
+    my $values = RT::ObjectCustomFieldValues->new($self->CurrentUser);
     unless ($self->CurrentUserHasRight('SeeCustomField')) {
         # Return an empty object if they have no rights to see
         return ($values);
diff --git a/lib/RT/Date.pm b/lib/RT/Date.pm
index 2b9f2a2..3b2ec85 100755
--- a/lib/RT/Date.pm
+++ b/lib/RT/Date.pm
@@ -118,7 +118,7 @@ our @FORMATTERS = (
     'iCal',          # loc
 );
 if ( eval 'use DateTime qw(); 1;' && eval 'use DateTime::Locale qw(); 1;' && 
-     DateTime->can('format_cldr') && DateTime::Locale::root->can('date_format_full') ) {
+     "DateTime"->can('format_cldr') && DateTime::Locale::root->can('date_format_full') ) {
     push @FORMATTERS, 'LocalizedDateTime'; # loc
 }
 
@@ -655,7 +655,7 @@ sub LocalizedDateTime
     return $self->loc("DateTime module missing") unless ( eval 'use DateTime qw(); 1;' );
     return $self->loc("DateTime::Locale module missing") unless ( eval 'use DateTime::Locale qw(); 1;' );
     return $self->loc("DateTime doesn't support format_cldr, you must upgrade to use this feature") 
-        unless can DateTime::('format_cldr');
+        unless "DateTime"->can('format_cldr');
 
 
     my $date_format = $args{'DateFormat'};
@@ -681,18 +681,19 @@ sub LocalizedDateTime
     $mon++;
     my $tz = $self->Timezone($args{'Timezone'});
 
-    # FIXME : another way to call this module without conflict with local
-    # DateTime method?
-    my $dt = new DateTime::( locale => $lang,
-                            time_zone => $tz,
-                            year => $year,
-                            month => $mon,
-                            day => $mday,
-                            hour => $hour,
-                            minute => $min,
-                            second => $sec,
-                            nanosecond => 0,
-                          );
+    # The quotes are necessary to get the DateTime package, and not the
+    # call the local DateTime subroutine.
+    my $dt = "DateTime"->new(
+        locale => $lang,
+        time_zone => $tz,
+        year => $year,
+        month => $mon,
+        day => $mday,
+        hour => $hour,
+        minute => $min,
+        second => $sec,
+        nanosecond => 0,
+    );
 
     if ( $args{'Date'} && !$args{'Time'} ) {
         return $dt->format_cldr($date_format);
diff --git a/lib/RT/EmailParser.pm b/lib/RT/EmailParser.pm
index a0affd9..ec91541 100755
--- a/lib/RT/EmailParser.pm
+++ b/lib/RT/EmailParser.pm
@@ -235,7 +235,7 @@ sub _DecodeBody {
 
     require MIME::Decoder;
     my $encoding = $entity->head->mime_encoding;
-    my $decoder = new MIME::Decoder $encoding;
+    my $decoder = MIME::Decoder->new( $encoding );
     unless ( $decoder ) {
         $RT::Logger->error("Couldn't find decoder for '$encoding', switching to binary");
         $old->is_encoded(0);
@@ -244,7 +244,7 @@ sub _DecodeBody {
 
     require MIME::Body;
     # XXX: use InCore for now, but later must switch to files
-    my $new = new MIME::Body::InCore;
+    my $new = MIME::Body::InCore->new;
     $new->binmode(1);
     $new->is_encoded(0);
 
diff --git a/lib/RT/Groups_Overlay.pm b/lib/RT/Groups_Overlay.pm
index ed18939..62a6bcb 100755
--- a/lib/RT/Groups_Overlay.pm
+++ b/lib/RT/Groups_Overlay.pm
@@ -324,7 +324,7 @@ sub WithRight {
 
     #XXX: DIRTY HACK
     use DBIx::SearchBuilder::Union;
-    my $union = new DBIx::SearchBuilder::Union;
+    my $union = DBIx::SearchBuilder::Union->new;
     $union->add($from_role);
     $union->add($from_group);
     %$self = %$union;
diff --git a/lib/RT/Handle.pm b/lib/RT/Handle.pm
index cb8094d..500adbe 100755
--- a/lib/RT/Handle.pm
+++ b/lib/RT/Handle.pm
@@ -243,13 +243,13 @@ sub CheckIntegrity {
     RT::InitLogging();
 
     require RT::CurrentUser;
-    my $test_user = new RT::CurrentUser;
+    my $test_user = RT::CurrentUser->new;
     $test_user->Load('RT_System');
     unless ( $test_user->id ) {
         return (0, 'no system user', "Couldn't find RT_System user in the DB '$dsn'");
     }
 
-    $test_user = new RT::CurrentUser;
+    $test_user = RT::CurrentUser->new;
     $test_user->Load('Nobody');
     unless ( $test_user->id ) {
         return (0, 'no nobody user', "Couldn't find Nobody user in the DB '$dsn'");
@@ -593,13 +593,13 @@ sub InsertInitialData {
     {
         require RT::CurrentUser;
 
-        my $test_user = RT::User->new( new RT::CurrentUser );
+        my $test_user = RT::User->new( RT::CurrentUser->new );
         $test_user->Load('RT_System');
         if ( $test_user->id ) {
             push @warns, "Found system user in the DB.";
         }
         else {
-            my $user = RT::User->new( new RT::CurrentUser );
+            my $user = RT::User->new( RT::CurrentUser->new );
             my ( $val, $msg ) = $user->_BootstrapCreate(
                 Name     => 'RT_System',
                 RealName => 'The RT System itself',
@@ -804,7 +804,7 @@ sub InsertData {
     if ( @Users ) {
         $RT::Logger->debug("Creating users...");
         foreach my $item (@Users) {
-            my $new_entry = new RT::User( $RT::SystemUser );
+            my $new_entry = RT::User->new( $RT::SystemUser );
             my ( $return, $msg ) = $new_entry->Create(%$item);
             unless ( $return ) {
                 $RT::Logger->error( $msg );
@@ -817,7 +817,7 @@ sub InsertData {
     if ( @Queues ) {
         $RT::Logger->debug("Creating queues...");
         for my $item (@Queues) {
-            my $new_entry = new RT::Queue($RT::SystemUser);
+            my $new_entry = RT::Queue->new( $RT::SystemUser );
             my ( $return, $msg ) = $new_entry->Create(%$item);
             unless ( $return ) {
                 $RT::Logger->error( $msg );
@@ -830,7 +830,7 @@ sub InsertData {
     if ( @CustomFields ) {
         $RT::Logger->debug("Creating custom fields...");
         for my $item ( @CustomFields ) {
-            my $new_entry = new RT::CustomField( $RT::SystemUser );
+            my $new_entry = RT::CustomField->new( $RT::SystemUser );
             my $values    = delete $item->{'Values'};
 
             my @queues;
@@ -987,7 +987,7 @@ sub InsertData {
         $RT::Logger->debug("Creating templates...");
 
         for my $item (@Templates) {
-            my $new_entry = new RT::Template($RT::SystemUser);
+            my $new_entry = RT::Template->new( $RT::SystemUser );
             my ( $return, $msg ) = $new_entry->Create(%$item);
             unless ( $return ) {
                 $RT::Logger->error( $msg );
@@ -1002,7 +1002,7 @@ sub InsertData {
         $RT::Logger->debug("Creating scrips...");
 
         for my $item (@Scrips) {
-            my $new_entry = new RT::Scrip($RT::SystemUser);
+            my $new_entry = RT::Scrip->new( $RT::SystemUser );
 
             my @queues = ref $item->{'Queue'} eq 'ARRAY'? @{ $item->{'Queue'} }: $item->{'Queue'} || 0;
             push @queues, 0 unless @queues; # add global queue at least
@@ -1070,7 +1070,7 @@ sub ACLEquivGroupId {
     my $cu = $RT::SystemUser;
     unless ( $cu ) {
         require RT::CurrentUser;
-        $cu = new RT::CurrentUser;
+        $cu = RT::CurrentUser->new;
         $cu->LoadByName('RT_System');
         warn "Couldn't load RT_System user" unless $cu->id;
     }
diff --git a/lib/RT/Interface/CLI.pm b/lib/RT/Interface/CLI.pm
index 32d3269..6c736f6 100755
--- a/lib/RT/Interface/CLI.pm
+++ b/lib/RT/Interface/CLI.pm
@@ -144,7 +144,7 @@ sub GetCurrentUser  {
     #If the current user is 0, then RT will assume that the User object
     #is that of the currentuser.
 
-    $CurrentUser = new RT::CurrentUser();
+    $CurrentUser = RT::CurrentUser->new();
     $CurrentUser->LoadByGecos($Gecos);
 
     unless ($CurrentUser->Id) {
diff --git a/lib/RT/Interface/Email.pm b/lib/RT/Interface/Email.pm
index df38419..9e62d0c 100755
--- a/lib/RT/Interface/Email.pm
+++ b/lib/RT/Interface/Email.pm
@@ -955,7 +955,7 @@ sub CreateUser {
     }
 
     #Load the new user object
-    my $CurrentUser = new RT::CurrentUser;
+    my $CurrentUser = RT::CurrentUser->new;
     $CurrentUser->LoadByEmail( $Address );
 
     unless ( $CurrentUser->id ) {
diff --git a/lib/RT/Interface/Email/Auth/MailFrom.pm b/lib/RT/Interface/Email/Auth/MailFrom.pm
index be2f517..0b87be7 100755
--- a/lib/RT/Interface/Email/Auth/MailFrom.pm
+++ b/lib/RT/Interface/Email/Auth/MailFrom.pm
@@ -70,7 +70,7 @@ sub GetCurrentUser {
         return ( $args{'CurrentUser'}, -1 );
     }
 
-    my $CurrentUser = new RT::CurrentUser;
+    my $CurrentUser = RT::CurrentUser->new;
     $CurrentUser->LoadByEmail( $Address );
     $CurrentUser->LoadByName( $Address ) unless $CurrentUser->Id;
     if ( $CurrentUser->Id ) {
diff --git a/lib/RT/Interface/Web.pm b/lib/RT/Interface/Web.pm
index e2cfb0f..80dfd4d 100755
--- a/lib/RT/Interface/Web.pm
+++ b/lib/RT/Interface/Web.pm
@@ -1082,9 +1082,9 @@ sub CreateTicket {
 
     my (@Actions);
 
-    my $Ticket = new RT::Ticket( $session{'CurrentUser'} );
+    my $Ticket = RT::Ticket->new( $session{'CurrentUser'} );
 
-    my $Queue = new RT::Queue( $session{'CurrentUser'} );
+    my $Queue = RT::Queue->new( $session{'CurrentUser'} );
     unless ( $Queue->Load( $ARGS{'Queue'} ) ) {
         Abort('Queue not found');
     }
@@ -1095,12 +1095,12 @@ sub CreateTicket {
 
     my $due;
     if ( defined $ARGS{'Due'} and $ARGS{'Due'} =~ /\S/ ) {
-        $due = new RT::Date( $session{'CurrentUser'} );
+        $due = RT::Date->new( $session{'CurrentUser'} );
         $due->Set( Format => 'unknown', Value => $ARGS{'Due'} );
     }
     my $starts;
     if ( defined $ARGS{'Starts'} and $ARGS{'Starts'} =~ /\S/ ) {
-        $starts = new RT::Date( $session{'CurrentUser'} );
+        $starts = RT::Date->new( $session{'CurrentUser'} );
         $starts->Set( Format => 'unknown', Value => $ARGS{'Starts'} );
     }
 
diff --git a/lib/RT/Queue_Overlay.pm b/lib/RT/Queue_Overlay.pm
index c7ab7f3..e4e6ad8 100755
--- a/lib/RT/Queue_Overlay.pm
+++ b/lib/RT/Queue_Overlay.pm
@@ -473,7 +473,7 @@ sub ValidateName {
     my $self = shift;
     my $name = shift;
 
-    my $tempqueue = new RT::Queue($RT::SystemUser);
+    my $tempqueue = RT::Queue->new($RT::SystemUser);
     $tempqueue->Load($name);
 
     #If this queue exists, return undef
diff --git a/lib/RT/Record.pm b/lib/RT/Record.pm
index 0151f7c..e8a52f9 100755
--- a/lib/RT/Record.pm
+++ b/lib/RT/Record.pm
@@ -378,7 +378,7 @@ sub LoadByCols {
 
 sub LastUpdatedObj {
     my $self = shift;
-    my $obj  = new RT::Date( $self->CurrentUser );
+    my $obj  = RT::Date->new( $self->CurrentUser );
 
     $obj->Set( Format => 'sql', Value => $self->LastUpdated );
     return $obj;
@@ -390,7 +390,7 @@ sub LastUpdatedObj {
 
 sub CreatedObj {
     my $self = shift;
-    my $obj  = new RT::Date( $self->CurrentUser );
+    my $obj  = RT::Date->new( $self->CurrentUser );
 
     $obj->Set( Format => 'sql', Value => $self->Created );
 
@@ -520,7 +520,7 @@ It takes no options. Arguably, this is a bug
 sub _SetLastUpdated {
     my $self = shift;
     use RT::Date;
-    my $now = new RT::Date( $self->CurrentUser );
+    my $now = RT::Date->new( $self->CurrentUser );
     $now->SetToNow();
 
     if ( $self->_Accessible( 'LastUpdated', 'auto' ) ) {
@@ -1198,7 +1198,7 @@ sub _Links {
     my $type  = shift || "";
 
     unless ( $self->{"$field$type"} ) {
-        $self->{"$field$type"} = new RT::Links( $self->CurrentUser );
+        $self->{"$field$type"} = RT::Links->new( $self->CurrentUser );
             # at least to myself
             $self->{"$field$type"}->Limit( FIELD => $field,
                                            VALUE => $self->URI,
@@ -1381,7 +1381,7 @@ sub _DeleteLink {
         return ( 0, $self->loc('Either base or target must be specified') );
     }
 
-    my $link = new RT::Link( $self->CurrentUser );
+    my $link = RT::Link->new( $self->CurrentUser );
     $RT::Logger->debug( "Trying to load link: " . $args{'Base'} . " " . $args{'Type'} . " " . $args{'Target'} );
 
 
@@ -1453,7 +1453,7 @@ sub _NewTransaction {
     }
 
     require RT::Transaction;
-    my $trans = new RT::Transaction( $self->CurrentUser );
+    my $trans = RT::Transaction->new( $self->CurrentUser );
     my ( $transaction, $msg ) = $trans->Create(
 	ObjectId  => $self->Id,
 	ObjectType => ref($self),
diff --git a/lib/RT/Scrips_Overlay.pm b/lib/RT/Scrips_Overlay.pm
index eecf293..34d0531 100644
--- a/lib/RT/Scrips_Overlay.pm
+++ b/lib/RT/Scrips_Overlay.pm
@@ -116,7 +116,7 @@ sub LimitToGlobal  {
 sub NewItem  {
   my $self = shift;
   
-  return(new RT::Scrip($self->CurrentUser));
+  return(RT::Scrip->new($self->CurrentUser));
 }
 # }}}
 
diff --git a/lib/RT/Shredder/POD.pm b/lib/RT/Shredder/POD.pm
index 6b7e016..4e55c01 100644
--- a/lib/RT/Shredder/POD.pm
+++ b/lib/RT/Shredder/POD.pm
@@ -55,7 +55,7 @@ use Pod::Select;
 sub plugin_html
 {
     my ($file, $out_fh) = @_;
-    my $parser = new RT::Shredder::POD::HTML;
+    my $parser = RT::Shredder::POD::HTML->new;
     $parser->select('ARGUMENTS', 'USAGE');
     $parser->parse_from_file( $file, $out_fh );
 }
@@ -65,7 +65,7 @@ sub plugin_cli
     my ($file, $out_fh, $no_name) = @_;
     use Pod::PlainText;
     local @Pod::PlainText::ISA = ('Pod::Select', @Pod::PlainText::ISA);
-    my $parser = new Pod::PlainText;
+    my $parser = Pod::PlainText->new;
     $parser->select('SYNOPSIS', 'ARGUMENTS', 'USAGE');
     $parser->add_selection('NAME') unless $no_name;
     $parser->parse_from_file( $file, $out_fh );
@@ -76,7 +76,7 @@ sub shredder_cli
     my ($file, $out_fh) = @_;
     use Pod::PlainText;
     local @Pod::PlainText::ISA = ('Pod::Select', @Pod::PlainText::ISA);
-    my $parser = new Pod::PlainText;
+    my $parser = Pod::PlainText->new;
     $parser->select('NAME', 'SYNOPSIS', 'USAGE', 'OPTIONS');
     $parser->parse_from_file( $file, $out_fh );
 }
diff --git a/lib/RT/Shredder/Record.pm b/lib/RT/Shredder/Record.pm
index 2e48048..17e1179 100644
--- a/lib/RT/Shredder/Record.pm
+++ b/lib/RT/Shredder/Record.pm
@@ -245,7 +245,7 @@ sub ValidateRelations
             @_
            );
     unless( $args{'Shredder'} ) {
-        $args{'Shredder'} = new RT::Shredder();
+        $args{'Shredder'} = RT::Shredder->new();
     }
 
     my $rec = $args{'Shredder'}->PutObject( Object => $self );
diff --git a/lib/RT/Template_Overlay.pm b/lib/RT/Template_Overlay.pm
index e6f6374..c0b780f 100755
--- a/lib/RT/Template_Overlay.pm
+++ b/lib/RT/Template_Overlay.pm
@@ -217,7 +217,7 @@ sub Create {
         $args{'Queue'} = 0;
     }
     else {
-        my $QueueObj = new RT::Queue( $self->CurrentUser );
+        my $QueueObj = RT::Queue->new( $self->CurrentUser );
         $QueueObj->Load( $args{'Queue'} ) || return ( undef, $self->loc('Invalid queue') );
     
         unless ( $QueueObj->CurrentUserHasRight('ModifyTemplate') ) {
diff --git a/lib/RT/Templates_Overlay.pm b/lib/RT/Templates_Overlay.pm
index ae94ad1..a8bff1c 100755
--- a/lib/RT/Templates_Overlay.pm
+++ b/lib/RT/Templates_Overlay.pm
@@ -155,7 +155,7 @@ sub NewItem  {
   my $self = shift;
 
   use RT::Template;
-  my $item = new RT::Template($self->CurrentUser);
+  my $item = RT::Template->new($self->CurrentUser);
   return($item);
 }
 # }}}
diff --git a/lib/RT/Test.pm b/lib/RT/Test.pm
index 29c1fb4..8611887 100644
--- a/lib/RT/Test.pm
+++ b/lib/RT/Test.pm
@@ -349,14 +349,14 @@ sub bootstrap_db {
     $dbh = _get_dbh(RT::Handle->DSN,
             $ENV{RT_DBA_USER}, $ENV{RT_DBA_PASSWORD});
 
-    $RT::Handle = new RT::Handle;
+    $RT::Handle = RT::Handle->new;
     $RT::Handle->dbh( $dbh );
     $RT::Handle->InsertSchema( $dbh );
 
     my $db_type = RT->Config->Get('DatabaseType');
     $RT::Handle->InsertACL( $dbh ) unless $db_type eq 'Oracle';
 
-    $RT::Handle = new RT::Handle;
+    $RT::Handle = RT::Handle->new;
     $RT::Handle->dbh( undef );
     RT->ConnectToDatabase;
     RT->InitLogging;
@@ -364,7 +364,7 @@ sub bootstrap_db {
     $RT::Handle->InsertInitialData;
 
     DBIx::SearchBuilder::Record::Cachable->FlushCache;
-    $RT::Handle = new RT::Handle;
+    $RT::Handle = RT::Handle->new;
     $RT::Handle->dbh( undef );
     RT->Init;
 
@@ -902,7 +902,7 @@ sub lsign_gnupg_key {
     my $key = shift;
 
     require RT::Crypt::GnuPG; require GnuPG::Interface;
-    my $gnupg = new GnuPG::Interface;
+    my $gnupg = GnuPG::Interface->new;
     my %opt = RT->Config->Get('GnuPGOptions');
     $gnupg->options->hash_init(
         RT::Crypt::GnuPG::_PrepareGnuPGOptions( %opt ),
@@ -911,12 +911,12 @@ sub lsign_gnupg_key {
 
     my %handle; 
     my $handles = GnuPG::Handles->new(
-        stdin   => ($handle{'input'}   = new IO::Handle),
-        stdout  => ($handle{'output'}  = new IO::Handle),
-        stderr  => ($handle{'error'}   = new IO::Handle),
-        logger  => ($handle{'logger'}  = new IO::Handle),
-        status  => ($handle{'status'}  = new IO::Handle),
-        command => ($handle{'command'} = new IO::Handle),
+        stdin   => ($handle{'input'}   = IO::Handle->new),
+        stdout  => ($handle{'output'}  = IO::Handle->new),
+        stderr  => ($handle{'error'}   = IO::Handle->new),
+        logger  => ($handle{'logger'}  = IO::Handle->new),
+        status  => ($handle{'status'}  = IO::Handle->new),
+        command => ($handle{'command'} = IO::Handle->new),
     );
 
     eval {
@@ -959,7 +959,7 @@ sub trust_gnupg_key {
     my $key = shift;
 
     require RT::Crypt::GnuPG; require GnuPG::Interface;
-    my $gnupg = new GnuPG::Interface;
+    my $gnupg = GnuPG::Interface->new;
     my %opt = RT->Config->Get('GnuPGOptions');
     $gnupg->options->hash_init(
         RT::Crypt::GnuPG::_PrepareGnuPGOptions( %opt ),
@@ -968,12 +968,12 @@ sub trust_gnupg_key {
 
     my %handle; 
     my $handles = GnuPG::Handles->new(
-        stdin   => ($handle{'input'}   = new IO::Handle),
-        stdout  => ($handle{'output'}  = new IO::Handle),
-        stderr  => ($handle{'error'}   = new IO::Handle),
-        logger  => ($handle{'logger'}  = new IO::Handle),
-        status  => ($handle{'status'}  = new IO::Handle),
-        command => ($handle{'command'} = new IO::Handle),
+        stdin   => ($handle{'input'}   = IO::Handle->new),
+        stdout  => ($handle{'output'}  = IO::Handle->new),
+        stderr  => ($handle{'error'}   = IO::Handle->new),
+        logger  => ($handle{'logger'}  = IO::Handle->new),
+        status  => ($handle{'status'}  = IO::Handle->new),
+        command => ($handle{'command'} = IO::Handle->new),
     );
 
     eval {
@@ -1055,7 +1055,7 @@ sub start_standalone_server {
     my $ret = $s->started_ok;
     push @SERVERS, $s->pids;
 
-    $RT::Handle = new RT::Handle;
+    $RT::Handle = RT::Handle->new;
     $RT::Handle->dbh( undef );
     RT->ConnectToDatabase;
 
diff --git a/lib/RT/Ticket_Overlay.pm b/lib/RT/Ticket_Overlay.pm
index 2104f86..b75510c 100755
--- a/lib/RT/Ticket_Overlay.pm
+++ b/lib/RT/Ticket_Overlay.pm
@@ -51,7 +51,7 @@
 =head1 SYNOPSIS
 
   use RT::Ticket;
-  my $ticket = new RT::Ticket($CurrentUser);
+  my $new RT->new::Ticket($CurrentUser);
   $ticket->Load($ticket_id);
 
 =head1 DESCRIPTION
@@ -332,7 +332,7 @@ sub Create {
     # than assuming it's in ISO format.
 
     #Set the due date. if we didn't get fed one, use the queue default due in
-    my $Due = new RT::Date( $self->CurrentUser );
+    my $Due = RT::Date->new( $self->CurrentUser );
     if ( defined $args{'Due'} ) {
         $Due->Set( Format => 'ISO', Value => $args{'Due'} );
     }
@@ -341,12 +341,12 @@ sub Create {
         $Due->AddDays( $due_in );
     }
 
-    my $Starts = new RT::Date( $self->CurrentUser );
+    my $Starts = RT::Date->new( $self->CurrentUser );
     if ( defined $args{'Starts'} ) {
         $Starts->Set( Format => 'ISO', Value => $args{'Starts'} );
     }
 
-    my $Started = new RT::Date( $self->CurrentUser );
+    my $Started = RT::Date->new( $self->CurrentUser );
     if ( defined $args{'Started'} ) {
         $Started->Set( Format => 'ISO', Value => $args{'Started'} );
     }
@@ -354,7 +354,7 @@ sub Create {
         $Started->SetToNow;
     }
 
-    my $Resolved = new RT::Date( $self->CurrentUser );
+    my $Resolved = RT::Date->new( $self->CurrentUser );
     if ( defined $args{'Resolved'} ) {
         $Resolved->Set( Format => 'ISO', Value => $args{'Resolved'} );
     }
@@ -420,7 +420,7 @@ sub Create {
 
     #If we haven't been handed a valid owner, make it nobody.
     unless ( defined($Owner) && $Owner->Id ) {
-        $Owner = new RT::User( $self->CurrentUser );
+        $Owner = RT::User->new( $self->CurrentUser );
         $Owner->Load( $RT::Nobody->Id );
     }
 
@@ -845,7 +845,7 @@ sub Import {
             $Owner = $args{'Owner'};
         }
         else {
-            $Owner = new RT::User( $self->CurrentUser );
+            $Owner = RT::User->new( $self->CurrentUser );
             $Owner->Load( $args{'Owner'} );
             if ( !defined( $Owner->id ) ) {
                 $Owner->Load( $RT::Nobody->id );
@@ -880,7 +880,7 @@ sub Import {
 
     #If we haven't been handed a valid owner, make it nobody.
     unless ( defined($Owner) ) {
-        $Owner = new RT::User( $self->CurrentUser );
+        $Owner = RT::User->new( $self->CurrentUser );
         $Owner->Load( $RT::Nobody->UserObj->Id );
     }
 
@@ -1789,7 +1789,7 @@ sub QueueObj {
 sub DueObj {
     my $self = shift;
 
-    my $time = new RT::Date( $self->CurrentUser );
+    my $time = RT::Date->new( $self->CurrentUser );
 
     # -1 is RT::Date slang for never
     if ( my $due = $self->Due ) {
@@ -1830,7 +1830,7 @@ sub DueAsString {
 sub ResolvedObj {
     my $self = shift;
 
-    my $time = new RT::Date( $self->CurrentUser );
+    my $time = RT::Date->new( $self->CurrentUser );
     $time->Set( Format => 'sql', Value => $self->Resolved );
     return $time;
 }
@@ -1857,7 +1857,7 @@ sub SetStarted {
     }
 
     #We create a date object to catch date weirdness
-    my $time_obj = new RT::Date( $self->CurrentUser() );
+    my $time_obj = RT::Date->new( $self->CurrentUser() );
     if ( $time ) {
         $time_obj->Set( Format => 'ISO', Value => $time );
     }
@@ -1871,7 +1871,7 @@ sub SetStarted {
     #We need $TicketAsSystem, in case the current user doesn't have
     #ShowTicket
     #
-    my $TicketAsSystem = new RT::Ticket($RT::SystemUser);
+    my $TicketAsSystem = RT::Ticket->new($RT::SystemUser);
     $TicketAsSystem->Load( $self->Id );
     if ( $TicketAsSystem->Status eq 'new' ) {
         $TicketAsSystem->Open();
@@ -1895,7 +1895,7 @@ sub SetStarted {
 sub StartedObj {
     my $self = shift;
 
-    my $time = new RT::Date( $self->CurrentUser );
+    my $time = RT::Date->new( $self->CurrentUser );
     $time->Set( Format => 'sql', Value => $self->Started );
     return $time;
 }
@@ -1914,7 +1914,7 @@ sub StartedObj {
 sub StartsObj {
     my $self = shift;
 
-    my $time = new RT::Date( $self->CurrentUser );
+    my $time = RT::Date->new( $self->CurrentUser );
     $time->Set( Format => 'sql', Value => $self->Starts );
     return $time;
 }
@@ -1933,7 +1933,7 @@ sub StartsObj {
 sub ToldObj {
     my $self = shift;
 
-    my $time = new RT::Date( $self->CurrentUser );
+    my $time = RT::Date->new( $self->CurrentUser );
     $time->Set( Format => 'sql', Value => $self->Told );
     return $time;
 }
@@ -2629,7 +2629,7 @@ sub MergeInto {
     }
 
     #find all of the tickets that were merged into this ticket. 
-    my $old_mergees = new RT::Tickets( $self->CurrentUser );
+    my $old_mergees = RT::Tickets->new( $self->CurrentUser );
     $old_mergees->Limit(
         FIELD    => 'EffectiveId',
         OPERATOR => '=',
@@ -2702,7 +2702,7 @@ sub OwnerObj {
     #get deep recursion. if we need ACLs here, we need
     #an equiv without ACLs
 
-    my $owner = new RT::User( $self->CurrentUser );
+    my $owner = RT::User->new( $self->CurrentUser );
     $owner->Load( $self->__Value('Owner') );
 
     #Return the owner object
@@ -3130,7 +3130,7 @@ sub SetTold {
         return ( 0, $self->loc("Permission Denied") );
     }
 
-    my $datetold = new RT::Date( $self->CurrentUser );
+    my $datetold = RT::Date->new( $self->CurrentUser );
     if ($told) {
         $datetold->Set( Format => 'iso',
                         Value  => $told );
@@ -3154,7 +3154,7 @@ Updates the told without a transaction or acl check. Useful when we're sending r
 sub _SetTold {
     my $self = shift;
 
-    my $now = new RT::Date( $self->CurrentUser );
+    my $now = RT::Date->new( $self->CurrentUser );
     $now->SetToNow();
 
     #use __Set to get no ACLs ;)
diff --git a/lib/RT/Tickets_Overlay.pm b/lib/RT/Tickets_Overlay.pm
index 7887bf7..f3e70f9 100755
--- a/lib/RT/Tickets_Overlay.pm
+++ b/lib/RT/Tickets_Overlay.pm
@@ -65,7 +65,7 @@
 =head1 SYNOPSIS
 
   use RT::Tickets;
-  my $tickets = new RT::Tickets($CurrentUser);
+  my $tickets = RT::Tickets->new($CurrentUser);
 
 =head1 DESCRIPTION
 
@@ -1897,7 +1897,7 @@ sub LimitQueue {
 
     #TODO  VALUE should also take queue objects
     if ( defined $args{'VALUE'} && $args{'VALUE'} !~ /^\d+$/ ) {
-        my $queue = new RT::Queue( $self->CurrentUser );
+        my $queue = RT::Queue->new( $self->CurrentUser );
         $queue->Load( $args{'VALUE'} );
         $args{'VALUE'} = $queue->Id;
     }
@@ -2292,7 +2292,7 @@ sub LimitOwner {
         @_
     );
 
-    my $owner = new RT::User( $self->CurrentUser );
+    my $owner = RT::User->new( $self->CurrentUser );
     $owner->Load( $args{'VALUE'} );
 
     # FIXME: check for a valid $owner
diff --git a/lib/RT/Transaction_Overlay.pm b/lib/RT/Transaction_Overlay.pm
index 6c329b1..6e89b10 100755
--- a/lib/RT/Transaction_Overlay.pm
+++ b/lib/RT/Transaction_Overlay.pm
@@ -366,7 +366,7 @@ sub Content {
 
         if ( $max > 76 ) {
             require Text::Wrapper;
-            my $wrapper = new Text::Wrapper(
+            my $wrapper = Text::Wrapper->new(
                 columns    => $args{'Wrap'},
                 body_start => ( $max > 70 * 3 ? '   ' : '' ),
                 par_start  => ''
@@ -867,9 +867,9 @@ sub BriefDescription {
     Told => sub {
         my $self = shift;
         if ( $self->Field eq 'Told' ) {
-            my $t1 = new RT::Date($self->CurrentUser);
+            my $t1 = RT::Date->new($self->CurrentUser);
             $t1->Set(Format => 'ISO', Value => $self->NewValue);
-            my $t2 = new RT::Date($self->CurrentUser);
+            my $t2 = RT::Date->new($self->CurrentUser);
             $t2->Set(Format => 'ISO', Value => $self->OldValue);
             return $self->loc( "[_1] changed from [_2] to [_3]", $self->loc($self->Field), $t2->AsString, $t1->AsString );
         }
@@ -885,9 +885,9 @@ sub BriefDescription {
             return $self->loc('Password changed');
         }
         elsif ( $self->Field eq 'Queue' ) {
-            my $q1 = new RT::Queue( $self->CurrentUser );
+            my $q1 = RT::Queue->new( $self->CurrentUser );
             $q1->Load( $self->OldValue );
-            my $q2 = new RT::Queue( $self->CurrentUser );
+            my $q2 = RT::Queue->new( $self->CurrentUser );
             $q2->Load( $self->NewValue );
             return $self->loc("[_1] changed from [_2] to [_3]",
                               $self->loc($self->Field) , $q1->Name , $q2->Name);
@@ -895,9 +895,9 @@ sub BriefDescription {
 
         # Write the date/time change at local time:
         elsif ($self->Field =~  /Due|Starts|Started|Told/) {
-            my $t1 = new RT::Date($self->CurrentUser);
+            my $t1 = RT::Date->new($self->CurrentUser);
             $t1->Set(Format => 'ISO', Value => $self->NewValue);
-            my $t2 = new RT::Date($self->CurrentUser);
+            my $t2 = RT::Date->new($self->CurrentUser);
             $t2->Set(Format => 'ISO', Value => $self->OldValue);
             return $self->loc( "[_1] changed from [_2] to [_3]", $self->loc($self->Field), $t2->AsString, $t1->AsString );
         }
diff --git a/lib/RT/Users_Overlay.pm b/lib/RT/Users_Overlay.pm
index 6817a4a..c9ebb92 100755
--- a/lib/RT/Users_Overlay.pm
+++ b/lib/RT/Users_Overlay.pm
@@ -380,7 +380,7 @@ sub WhoHaveRight {
 
     #XXX: DIRTY HACK
     use DBIx::SearchBuilder::Union;
-    my $union = new DBIx::SearchBuilder::Union;
+    my $union = DBIx::SearchBuilder::Union->new;
     $union->add( $from_group );
     $union->add( $from_role );
     %$self = %$union;
diff --git a/sbin/rt-setup-database.in b/sbin/rt-setup-database.in
index ad1f7a5..98111d4 100755
--- a/sbin/rt-setup-database.in
+++ b/sbin/rt-setup-database.in
@@ -218,7 +218,7 @@ sub action_acl {
 
 sub action_coredata {
     my %args = @_;
-    $RT::Handle = new RT::Handle;
+    $RT::Handle = RT::Handle->new;
     $RT::Handle->dbh( undef );
     RT::ConnectToDatabase();
     RT::InitLogging();
@@ -231,7 +231,7 @@ sub action_coredata {
 
 sub action_insert {
     my %args = @_;
-    $RT::Handle = new RT::Handle;
+    $RT::Handle = RT::Handle->new;
     RT::Init();
     my ($status, $msg) = RT::Handle->CheckCompatibility( $RT::Handle->dbh, 'pre' );
     return ($status, $msg) unless $status;
diff --git a/sbin/rt-shredder.in b/sbin/rt-shredder.in
index 946121c..8443642 100755
--- a/sbin/rt-shredder.in
+++ b/sbin/rt-shredder.in
@@ -147,7 +147,7 @@ our %opt;
 parse_args();
 
 RT::Shredder::Init( %opt );
-my $shredder = new RT::Shredder;
+my $shredder =  RT::Shredder->new;
 
 {
     my $plugin = eval { $shredder->AddDumpPlugin( Arguments => {
@@ -257,7 +257,7 @@ sub process_plugins
 
 	my @res;
 	foreach my $str( @{ $opt{'plugin'} } ) {
-		my $plugin = new RT::Shredder::Plugin;
+		my $plugin = RT::Shredder::Plugin->new;
 		my( $status, $msg ) = $plugin->LoadByString( $str );
 		unless( $status ) {
 			print STDERR "Couldn't load plugin\n";

commit ad60f472a2a83b330b9b9c2afb029df55c89220a
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Thu Jun 30 20:36:05 2011 -0400

    Destroy all traces of indirect object notation

diff --git a/lib/RT/ACE_Overlay.pm b/lib/RT/ACE_Overlay.pm
index c3444b3..5bf9fdd 100755
--- a/lib/RT/ACE_Overlay.pm
+++ b/lib/RT/ACE_Overlay.pm
@@ -49,7 +49,7 @@
 =head1 SYNOPSIS
 
   use RT::ACE;
-  my $ace = new RT::ACE($CurrentUser);
+  my $ace = RT::ACE->new($CurrentUser);
 
 
 =head1 DESCRIPTION
diff --git a/lib/RT/ACL_Overlay.pm b/lib/RT/ACL_Overlay.pm
index cc41596..291b707 100755
--- a/lib/RT/ACL_Overlay.pm
+++ b/lib/RT/ACL_Overlay.pm
@@ -53,7 +53,7 @@
 =head1 SYNOPSIS
 
   use RT::ACL;
-my $ACL = new RT::ACL($CurrentUser);
+my $ACL = RT::ACL->new($CurrentUser);
 
 =head1 DESCRIPTION
 
diff --git a/lib/RT/Attributes_Overlay.pm b/lib/RT/Attributes_Overlay.pm
index 8b98a49..f69f97a 100644
--- a/lib/RT/Attributes_Overlay.pm
+++ b/lib/RT/Attributes_Overlay.pm
@@ -53,7 +53,7 @@ RT::Attributes - collection of RT::Attribute objects
 =head1 SYNOPSIS
 
     use RT::Attributes;
-    my $Attributes = new RT::Attributes($CurrentUser);
+    my $Attributes = RT::Attributes->new($CurrentUser);
 
 =head1 DESCRIPTION
 
diff --git a/lib/RT/CurrentUser.pm b/lib/RT/CurrentUser.pm
index d8ebaff..ac771a2 100755
--- a/lib/RT/CurrentUser.pm
+++ b/lib/RT/CurrentUser.pm
@@ -55,7 +55,7 @@
     use RT::CurrentUser;
 
     # laod
-    my $current_user = new RT::CurrentUser;
+    my $current_user = RT::CurrentUser->new;
     $current_user->Load(...);
     # or
     my $current_user = RT::CurrentUser->new( $user_obj );
diff --git a/lib/RT/Group_Overlay.pm b/lib/RT/Group_Overlay.pm
index 128939a..74f44c2 100755
--- a/lib/RT/Group_Overlay.pm
+++ b/lib/RT/Group_Overlay.pm
@@ -55,8 +55,8 @@
 
 =head1 SYNOPSIS
 
-use RT::Group;
-my $group = new RT::Group($CurrentUser);
+  use RT::Group;
+  my $group = RT::Group->new($CurrentUser);
 
 =head1 DESCRIPTION
 
diff --git a/lib/RT/Links_Overlay.pm b/lib/RT/Links_Overlay.pm
index 5ee785c..197da91 100755
--- a/lib/RT/Links_Overlay.pm
+++ b/lib/RT/Links_Overlay.pm
@@ -53,7 +53,7 @@
 =head1 SYNOPSIS
 
   use RT::Links;
-  my $links = new RT::Links($CurrentUser);
+  my $links = RT::Links->new($CurrentUser);
 
 =head1 DESCRIPTION
 
diff --git a/lib/RT/Shredder/Plugin.pm b/lib/RT/Shredder/Plugin.pm
index 0fa3a70..ba9c64f 100644
--- a/lib/RT/Shredder/Plugin.pm
+++ b/lib/RT/Shredder/Plugin.pm
@@ -64,7 +64,7 @@ RT::Shredder::Plugin - interface to access shredder plugins
   my %plugins = RT::Shredder::Plugin->List;
 
   # load plugin by name
-  my $plugin = new RT::Shredder::Plugin;
+  my $plugin = RT::Shredder::Plugin->new;
   my( $status, $msg ) = $plugin->LoadByName( 'Tickets' );
   unless( $status ) {
       print STDERR "Couldn't load plugin 'Tickets': $msg\n";
@@ -72,7 +72,7 @@ RT::Shredder::Plugin - interface to access shredder plugins
   }
 
   # load plugin by preformatted string
-  my $plugin = new RT::Shredder::Plugin;
+  my $plugin = RT::Shredder::Plugin->new;
   my( $status, $msg ) = $plugin->LoadByString( 'Tickets=status,deleted' );
   unless( $status ) {
       print STDERR "Couldn't load plugin: $msg\n";
diff --git a/lib/RT/StyleGuide.pod b/lib/RT/StyleGuide.pod
index 84ccb89..fe26a56 100755
--- a/lib/RT/StyleGuide.pod
+++ b/lib/RT/StyleGuide.pod
@@ -508,7 +508,7 @@ An example:
 	# this is my function!
 	sub foo {
                 my $val = shift;
-		my $obj = new Constructor;
+		my $obj = Constructor->new;
 		my($var1, $var2);
 
 		$obj->SetFoo($val);
diff --git a/share/html/Admin/Elements/ListGlobalCustomFields b/share/html/Admin/Elements/ListGlobalCustomFields
index 1fd8b76..ed32e5b 100755
--- a/share/html/Admin/Elements/ListGlobalCustomFields
+++ b/share/html/Admin/Elements/ListGlobalCustomFields
@@ -56,6 +56,6 @@
 %   }
 
 <%init>
-my $CustomFields = new RT::CustomFields ($session{'CurrentUser'});
+my $CustomFields = RT::CustomFields->new($session{'CurrentUser'});
 $CustomFields->LimitToGlobal();
 </%INIT>
diff --git a/share/html/Admin/Elements/QueueRightsForUser b/share/html/Admin/Elements/QueueRightsForUser
index 9acf98f..e33551c 100755
--- a/share/html/Admin/Elements/QueueRightsForUser
+++ b/share/html/Admin/Elements/QueueRightsForUser
@@ -54,7 +54,7 @@
 </ul>
 
 <%INIT>
-my $ACL = new RT::ACL($session{'CurrentUser'});
+my $ACL = RT::ACL->new($session{'CurrentUser'});
 $ACL->LimitToQueue($QueueObj->id);
 $ACL->LimitPrincipalToUser($PrincipalId);
 </%INIT>
diff --git a/share/html/Admin/Elements/SelectGroups b/share/html/Admin/Elements/SelectGroups
index d6888ad..b11c9fb 100755
--- a/share/html/Admin/Elements/SelectGroups
+++ b/share/html/Admin/Elements/SelectGroups
@@ -52,7 +52,7 @@
 </select>
 
 <%INIT>
-my $groups = new RT::Groups($session{'CurrentUser'});
+my $groups = RT::Groups->new($session{'CurrentUser'});
 $groups->Limit(FIELD => 'Domain', OPERATOR => '=', VALUE => $Domain);
 
 </%INIT>
diff --git a/share/html/Admin/Elements/SelectModifyGroup b/share/html/Admin/Elements/SelectModifyGroup
index 85dee9e..00f3fe1 100755
--- a/share/html/Admin/Elements/SelectModifyGroup
+++ b/share/html/Admin/Elements/SelectModifyGroup
@@ -50,7 +50,7 @@
 %}
 <%INIT>
 my ($Group);
-my $Groups = new RT::Groups($session{'CurrentUser'});
+my $Groups = RT::Groups->new($session{'CurrentUser'});
 $Groups->UnLimit;
 </%INIT>
 <%ARGS>
diff --git a/share/html/Admin/Elements/SelectModifyQueue b/share/html/Admin/Elements/SelectModifyQueue
index d676d01..b082c1e 100755
--- a/share/html/Admin/Elements/SelectModifyQueue
+++ b/share/html/Admin/Elements/SelectModifyQueue
@@ -50,7 +50,7 @@
 %}
 <%INIT>
 my ($queue);
-my $queues = new RT::Queues($session{'CurrentUser'});
+my $queues = RT::Queues->new($session{'CurrentUser'});
 $queues->UnLimit;
 </%INIT>
 <%ARGS>
diff --git a/share/html/Admin/Elements/SelectModifyUser b/share/html/Admin/Elements/SelectModifyUser
index 2941064..7856400 100755
--- a/share/html/Admin/Elements/SelectModifyUser
+++ b/share/html/Admin/Elements/SelectModifyUser
@@ -50,7 +50,7 @@
 %}
 <%INIT>
 my ($user);
-my $users = new RT::Users($session{'CurrentUser'});
+my $users = RT::Users->new($session{'CurrentUser'});
 $users->Limit(FIELD => 'id',
               VALUE => $RT::SystemUser->id,
               OPERATOR => '!=' );
diff --git a/share/html/Admin/Elements/SelectNewGroupMembers b/share/html/Admin/Elements/SelectNewGroupMembers
index 04e99e5..d586c9c 100755
--- a/share/html/Admin/Elements/SelectNewGroupMembers
+++ b/share/html/Admin/Elements/SelectNewGroupMembers
@@ -75,7 +75,7 @@ my @users = sort { lc($a->[0]) cmp lc($b->[0]) }
 % }
 
 <%INIT>
-my $users = new RT::Users($session{'CurrentUser'});
+my $users = RT::Users->new($session{'CurrentUser'});
 
 $users->Limit(
     FIELD           => 'id',
@@ -91,7 +91,7 @@ $users->Limit(
 );
 $users->LimitToPrivileged();
 
-my $groups = new RT::Groups($session{'CurrentUser'});
+my $groups = RT::Groups->new($session{'CurrentUser'});
 
 # self-recursive group membership considered harmful!
 $groups->Limit(FIELD => 'id', VALUE => $Group->id, OPERATOR => '!=' );
diff --git a/share/html/Admin/Elements/SelectRights b/share/html/Admin/Elements/SelectRights
index 0b2890d..1f7cb01 100755
--- a/share/html/Admin/Elements/SelectRights
+++ b/share/html/Admin/Elements/SelectRights
@@ -95,8 +95,8 @@ while ( my $ace = $ACLObj->Next ) {
     }
 
 
-    my $ACLObj = new RT::ACL($session{'CurrentUser'});
-    my $ACE = new RT::ACE($session{'CurrentUser'});
+    my $ACLObj = RT::ACL->new($session{'CurrentUser'});
+    my $ACE = RT::ACE->new($session{'CurrentUser'});
 
 
     $ACLObj->LimitToObject( $Object);
diff --git a/share/html/Admin/Elements/SelectUsers b/share/html/Admin/Elements/SelectUsers
index 14ebf82..967d937 100755
--- a/share/html/Admin/Elements/SelectUsers
+++ b/share/html/Admin/Elements/SelectUsers
@@ -54,7 +54,7 @@
 </select>
 
 <%INIT>
-my $users = new RT::Users($session{'CurrentUser'});
+my $users = RT::Users->new($session{'CurrentUser'});
 
 $users->Limit(FIELD => 'id', VALUE => $RT::SystemUser->id, OPERATOR => '!=' );
 $users->Limit(FIELD => 'id', VALUE => $RT::Nobody->id, OPERATOR => '!=' );
diff --git a/share/html/Admin/Global/Template.html b/share/html/Admin/Global/Template.html
index c7652e6..bebfd28 100755
--- a/share/html/Admin/Global/Template.html
+++ b/share/html/Admin/Global/Template.html
@@ -70,7 +70,7 @@ $TemplateObj->Description, Content => $TemplateObj->Content &>
 
 <%INIT>
 
-my $TemplateObj = new RT::Template($session{'CurrentUser'});
+my $TemplateObj = RT::Template->new($session{'CurrentUser'});
 my  ($title, @results, $current_subtab, $SubmitLabel);
 
 my $subtabs = {
diff --git a/share/html/Admin/Groups/History.html b/share/html/Admin/Groups/History.html
index 53b041d..bed421d 100644
--- a/share/html/Admin/Groups/History.html
+++ b/share/html/Admin/Groups/History.html
@@ -59,7 +59,7 @@
 
 <%INIT>
 my $current_tab = 'Admin/Groups/History.html?id='.$id;
-my $GroupObj = new RT::Group($session{'CurrentUser'});
+my $GroupObj = RT::Group->new($session{'CurrentUser'});
 $GroupObj->Load($id) || Abort("Couldn't load group '$id'");
 my $title = loc("History of the group [_1]", $GroupObj->Name);
 </%INIT>
diff --git a/share/html/Admin/Groups/Members.html b/share/html/Admin/Groups/Members.html
index 4b40e5b..b1bfe93 100755
--- a/share/html/Admin/Groups/Members.html
+++ b/share/html/Admin/Groups/Members.html
@@ -113,7 +113,7 @@ my @users = sort { lc($a->[0]) cmp lc($b->[0]) }
 
 <%INIT>
 
-my $Group = new RT::Group($session{'CurrentUser'});
+my $Group = RT::Group->new($session{'CurrentUser'});
 $Group->Load($id) || Abort(loc('Could not load group'));
 
 my (%UsersSeen, %GroupsSeen);
diff --git a/share/html/Admin/Queues/CustomField.html b/share/html/Admin/Queues/CustomField.html
index 2663fab..d7b9d6f 100755
--- a/share/html/Admin/Queues/CustomField.html
+++ b/share/html/Admin/Queues/CustomField.html
@@ -56,7 +56,7 @@
 <& /Admin/Elements/EditCustomField, title => $title, %ARGS &>
 
 <%INIT>
-my $QueueObj = new RT::Queue($session{'CurrentUser'});
+my $QueueObj = RT::Queue->new($session{'CurrentUser'});
 $QueueObj->Load($Queue);
 
 my ($title, $current_subtab);
diff --git a/share/html/Admin/Queues/History.html b/share/html/Admin/Queues/History.html
index e3a0e9c..a645d2d 100644
--- a/share/html/Admin/Queues/History.html
+++ b/share/html/Admin/Queues/History.html
@@ -59,7 +59,7 @@
 
 <%INIT>
 my $current_tab = 'Admin/Queues/History.html?id='.$id;
-my $QueueObj = new RT::Queue($session{'CurrentUser'});
+my $QueueObj = RT::Queue->new($session{'CurrentUser'});
 $QueueObj->Load($id) || Abort("Couldn't load queue '$id'");
 my $title = loc("History of the queue [_1]", $QueueObj->Name);
 </%INIT>
diff --git a/share/html/Admin/Queues/People.html b/share/html/Admin/Queues/People.html
index 917d88c..61b85f6 100755
--- a/share/html/Admin/Queues/People.html
+++ b/share/html/Admin/Queues/People.html
@@ -142,7 +142,7 @@ my ($field, @results, $User, $Users, $Groups, $watcher, $user_msg, $group_msg);
 
 
 
-my $QueueObj = new RT::Queue($session{'CurrentUser'});
+my $QueueObj = RT::Queue->new($session{'CurrentUser'});
 $QueueObj->Load($id) || Abort(loc("Couldn't load queue", $id));
 # }}}
 
@@ -180,7 +180,7 @@ if (!length $ARGS{'UserString'}) {
 $user_msg = loc("No principals selected.");
  }
 else {
-    $Users = new RT::Users($session{'CurrentUser'});
+    $Users = RT::Users->new($session{'CurrentUser'});
     $Users->Limit(FIELD => $ARGS{'UserField'},
                  VALUE => $ARGS{'UserString'},
                  OPERATOR => $ARGS{'UserOp'});
@@ -190,7 +190,7 @@ if (!length $ARGS{'GroupString'}) {
 $group_msg = loc("No principals selected.");
  }
 else {
-$Groups = new RT::Groups($session{'CurrentUser'});
+$Groups = RT::Groups->new($session{'CurrentUser'});
 $Groups->Limit(FIELD => 'Domain', OPERATOR => '=', VALUE => 'UserDefined');
 $Groups->Limit(FIELD => $ARGS{'GroupField'},
 		VALUE => $ARGS{'GroupString'},
diff --git a/share/html/Admin/Queues/Scrips.html b/share/html/Admin/Queues/Scrips.html
index 698e7e6..029a60a 100755
--- a/share/html/Admin/Queues/Scrips.html
+++ b/share/html/Admin/Queues/Scrips.html
@@ -60,7 +60,7 @@
 % }
 <& /Admin/Elements/EditScrips, title => $title, %ARGS &>
 <%init>
-my $QueueObj = new RT::Queue($session{'CurrentUser'});
+my $QueueObj = RT::Queue->new($session{'CurrentUser'});
 $QueueObj->Load($id);
 
 my $title;
diff --git a/share/html/Admin/Queues/Template.html b/share/html/Admin/Queues/Template.html
index 640e161..88696f2 100755
--- a/share/html/Admin/Queues/Template.html
+++ b/share/html/Admin/Queues/Template.html
@@ -71,7 +71,7 @@ $TemplateObj->Description, Content => $TemplateObj->Content &>
 
 <%INIT>
 
-my $TemplateObj = new RT::Template($session{'CurrentUser'});
+my $TemplateObj = RT::Template->new($session{'CurrentUser'});
 my  ($title, @results, $current_subtab, $SubmitLabel);
 
 my $subtabs = {
diff --git a/share/html/Admin/Queues/Templates.html b/share/html/Admin/Queues/Templates.html
index aac8332..9e39f48 100755
--- a/share/html/Admin/Queues/Templates.html
+++ b/share/html/Admin/Queues/Templates.html
@@ -56,7 +56,7 @@
 <& /Admin/Elements/EditTemplates, title => $title, %ARGS &>
 
 <%INIT>
-my $QueueObj = new RT::Queue($session{'CurrentUser'});
+my $QueueObj = RT::Queue->new($session{'CurrentUser'});
 $QueueObj->Load($id);
 
 my ($title, $current_subtab);
diff --git a/share/html/Admin/Queues/index.html b/share/html/Admin/Queues/index.html
index b5a2bb4..14d105a 100755
--- a/share/html/Admin/Queues/index.html
+++ b/share/html/Admin/Queues/index.html
@@ -91,7 +91,7 @@
 </form>
 
 <%INIT>
-my $queues = new RT::Queues($session{'CurrentUser'});
+my $queues = RT::Queues->new($session{'CurrentUser'});
 $queues->FindAllRows if $FindDisabledQueues;
 
 my ($caption);
diff --git a/share/html/Admin/Tools/Shredder/Elements/PluginArguments b/share/html/Admin/Tools/Shredder/Elements/PluginArguments
index 67b46ad..a83b0e6 100644
--- a/share/html/Admin/Tools/Shredder/Elements/PluginArguments
+++ b/share/html/Admin/Tools/Shredder/Elements/PluginArguments
@@ -56,7 +56,7 @@ $Plugin => ''
 </div>
 <%INIT>
 use RT::Shredder::Plugin;
-my $plugin_obj = new RT::Shredder::Plugin;
+my $plugin_obj = RT::Shredder::Plugin->new;
 my ($status, $msg) = $plugin_obj->LoadByName( $Plugin );
 die $msg unless $status;
 </%INIT>
diff --git a/share/html/Admin/Tools/Shredder/Elements/PluginHelp b/share/html/Admin/Tools/Shredder/Elements/PluginHelp
index daaa6b7..418ff5b 100644
--- a/share/html/Admin/Tools/Shredder/Elements/PluginHelp
+++ b/share/html/Admin/Tools/Shredder/Elements/PluginHelp
@@ -53,7 +53,7 @@ $Plugin => ''
 </div>
 <%ONCE>
 use RT::Shredder::Plugin;
-my $plugin_obj = new RT::Shredder::Plugin;
+my $plugin_obj = RT::Shredder::Plugin->new;
 my %plugins = $plugin_obj->List;
 </%ONCE>
 <%INIT>
diff --git a/share/html/Admin/Tools/Shredder/Elements/SelectPlugin b/share/html/Admin/Tools/Shredder/Elements/SelectPlugin
index 3835e0b..688ebba 100644
--- a/share/html/Admin/Tools/Shredder/Elements/SelectPlugin
+++ b/share/html/Admin/Tools/Shredder/Elements/SelectPlugin
@@ -68,6 +68,6 @@ $Plugin => ''
 </div>
 <%ONCE>
 use RT::Shredder::Plugin;
-my $plugin_obj = new RT::Shredder::Plugin;
+my $plugin_obj = RT::Shredder::Plugin->new;
 my %plugins = $plugin_obj->List('Search');
 </%ONCE>
diff --git a/share/html/Admin/Tools/Shredder/index.html b/share/html/Admin/Tools/Shredder/index.html
index d6a436a..acb956d 100644
--- a/share/html/Admin/Tools/Shredder/index.html
+++ b/share/html/Admin/Tools/Shredder/index.html
@@ -97,7 +97,7 @@ my $catch_non_fatals = sub {
 
 if( $Plugin ) { { # use additional block({}) to effectively exit block on errors
     use RT::Shredder::Plugin;
-    $plugin_obj = new RT::Shredder::Plugin;
+    $plugin_obj = RT::Shredder::Plugin->new;
     my( $status, $msg ) = $plugin_obj->LoadByName( $Plugin );
     unless( $status ) {
         push @{ $messages{Errors} }, $msg;
@@ -129,8 +129,8 @@ if( $Plugin ) { { # use additional block({}) to effectively exit block on errors
 my $dump_file = '';
 
 if( $Plugin && $Wipeout ) { { # use additional block({}) to effectively exit block on errors
-    my $shredder = new RT::Shredder( force => 1 );
-    my $backup_plugin = new RT::Shredder::Plugin;
+    my $shredder = RT::Shredder->new( force => 1 );
+    my $backup_plugin = RT::Shredder::Plugin->new;
     my ($status, $msg) = $backup_plugin->LoadByName('SQLDump');
     unless( $status ) {
         push @{ $messages{Errors} }, $msg;
@@ -173,7 +173,7 @@ if( $Plugin && ( $Search || $Wipeout ) ) { { # use additional block({}) to effec
     }
     push @{ $messages{Success} }, loc('executed plugin successfuly');
 
-    my $shredder = new RT::Shredder;
+    my $shredder = RT::Shredder->new;
     foreach my $o( grep defined, splice @objs ) {
         eval { push @objs, $shredder->CastObjectsToRecords( Objects => $o ) };
         $catch_non_fatals->() && last if $@;
diff --git a/share/html/Admin/Users/History.html b/share/html/Admin/Users/History.html
index e8928c8..68db242 100644
--- a/share/html/Admin/Users/History.html
+++ b/share/html/Admin/Users/History.html
@@ -59,7 +59,7 @@
 
 <%INIT>
 my $current_tab = 'Admin/Users/History.html?id='.$id;
-my $UserObj = new RT::User($session{'CurrentUser'});
+my $UserObj = RT::User->new($session{'CurrentUser'});
 $UserObj->Load($id) || Abort("Couldn't load user '$id'");
 my $title = loc("History of the user [_1]", $UserObj->Name);
 </%INIT>
diff --git a/share/html/Admin/Users/Modify.html b/share/html/Admin/Users/Modify.html
index 09c0c6c..f95930c 100755
--- a/share/html/Admin/Users/Modify.html
+++ b/share/html/Admin/Users/Modify.html
@@ -235,7 +235,7 @@
 <%INIT>
 
 my $current_tab;
-my $UserObj = new RT::User($session{'CurrentUser'});
+my $UserObj = RT::User->new($session{'CurrentUser'});
 my ($title, $PrivilegedChecked, $EnabledChecked, $Disabled, $result, @results);
 
 my ($val, $msg);
diff --git a/share/html/Admin/Users/MyRT.html b/share/html/Admin/Users/MyRT.html
index 346a2d6..f84dee5 100644
--- a/share/html/Admin/Users/MyRT.html
+++ b/share/html/Admin/Users/MyRT.html
@@ -74,7 +74,7 @@
 my @actions;
 my $current_tab;
 $current_tab = 'Admin/Users/MyRT.html?id='.$id if $id;
-my $UserObj = new RT::User($session{'CurrentUser'});
+my $UserObj = RT::User->new($session{'CurrentUser'});
 $UserObj->Load($id) || Abort("Couldn't load user '" . ($id || '') . "'");
 my $title = loc("RT at a glance for the user [_1]", $UserObj->Name);
 
diff --git a/share/html/Dashboards/Queries.html b/share/html/Dashboards/Queries.html
index bef0eee..2695269 100644
--- a/share/html/Dashboards/Queries.html
+++ b/share/html/Dashboards/Queries.html
@@ -82,7 +82,7 @@ my $current_subtab = 'Dashboards/Queries.html?id=' . $id;
 my @results;
 
 use RT::Dashboard;
-my $Dashboard = new RT::Dashboard($session{'CurrentUser'});
+my $Dashboard = RT::Dashboard->new( $session{'CurrentUser'} );
 my ($ok, $msg) = $Dashboard->LoadById($id);
 $ok || Abort(loc("Couldn't load dashboard [_1]: [_2]", $id, $msg));
 my $title = loc("Modify the queries of dashboard [_1]", $Dashboard->Name);
diff --git a/share/html/Elements/ScrubHTML b/share/html/Elements/ScrubHTML
index 87aaaf3..ab476f0 100644
--- a/share/html/Elements/ScrubHTML
+++ b/share/html/Elements/ScrubHTML
@@ -46,7 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <%ONCE>
-my $scrubber = new HTML::Scrubber;
+my $scrubber = HTML::Scrubber->new;
 $scrubber->default(
     0,
     {
diff --git a/share/html/Elements/SelectQueue b/share/html/Elements/SelectQueue
index acd73ae..14ebf98 100755
--- a/share/html/Elements/SelectQueue
+++ b/share/html/Elements/SelectQueue
@@ -46,7 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 % if ($Lite) {
-%     my $d = new RT::Queue($session{'CurrentUser'});
+%     my $d = RT::Queue->new($session{'CurrentUser'});
 %     $d->Load($Default);
 <input name="<%$Name%>" size="25" value="<%$d->Name%>" class="<%$Class%>" />
 % }
@@ -91,7 +91,7 @@ my $cache_key = "SelectQueue---"
                 . "---$CheckQueueRight---$ShowAllQueues";
 
 if (not defined $session{$cache_key} and not $Lite) {
-    my $q = new RT::Queues($session{'CurrentUser'});
+    my $q = RT::Queues->new($session{'CurrentUser'});
     $q->UnLimit;
     
     while (my $queue = $q->Next) {
diff --git a/share/html/Elements/SelectStatus b/share/html/Elements/SelectStatus
index 7aa7aa5..28e9637 100755
--- a/share/html/Elements/SelectStatus
+++ b/share/html/Elements/SelectStatus
@@ -55,7 +55,7 @@
 % }
 </select>
 <%ONCE>
-my $queue = new RT::Queue($session{'CurrentUser'});
+my $queue = RT::Queue->new($session{'CurrentUser'});
 my @status = $queue->StatusArray();
 </%ONCE>
 <%ARGS>
diff --git a/share/html/Elements/SelectTicketSortBy b/share/html/Elements/SelectTicketSortBy
index 6a1f2d9..9a0b438 100755
--- a/share/html/Elements/SelectTicketSortBy
+++ b/share/html/Elements/SelectTicketSortBy
@@ -52,7 +52,7 @@
 </select>
 
 <%INIT>
-my $tickets = new RT::Tickets($session{'CurrentUser'});
+my $tickets = RT::Tickets->new($session{'CurrentUser'});
 my @sortfields = $tickets->SortFields();
 
 </%INIT>
diff --git a/share/html/Install/Initialize.html b/share/html/Install/Initialize.html
index 0b9ed6d..f7ca314 100644
--- a/share/html/Install/Initialize.html
+++ b/share/html/Install/Initialize.html
@@ -110,14 +110,14 @@ if ( $Run ) {
                 ($status, $msg) = RT::Handle->InsertACL( $dbh );
             }
             elsif ( $action eq 'coredata' ) {
-                $RT::Handle = new RT::Handle;
+                $RT::Handle = RT::Handle->new;
                 $RT::Handle->dbh( undef );
                 RT::ConnectToDatabase();
                 RT::InitLogging();
                 ($status, $msg) = $RT::Handle->InsertInitialData;
             }
             elsif ( $action eq 'insert' ) {
-                $RT::Handle = new RT::Handle;
+                $RT::Handle = RT::Handle->new;
                 RT::Init();
                 my $file = $RT::EtcPath . "/initialdata";
                 ($status, $msg) = $RT::Handle->InsertData( $file );
diff --git a/share/html/Install/index.html b/share/html/Install/index.html
index bc9573b..922ea27 100644
--- a/share/html/Install/index.html
+++ b/share/html/Install/index.html
@@ -124,7 +124,7 @@ elsif ( $Run ) {
     RT::Interface::Web::Redirect(RT->Config->Get('WebURL') . 'Install/DatabaseType.html');
 } elsif ( $ChangeLang && $Lang ) {
     # hackish, but works
-    $session{'CurrentUser'} = new RT::CurrentUser;
+    $session{'CurrentUser'} = RT::CurrentUser->new;
     $session{'CurrentUser'}->LanguageHandle( $Lang );
 }
 my $lang_handle = do { local $@;
diff --git a/share/html/NoAuth/css/dhandler b/share/html/NoAuth/css/dhandler
index 2472a9f..e998329 100644
--- a/share/html/NoAuth/css/dhandler
+++ b/share/html/NoAuth/css/dhandler
@@ -58,7 +58,7 @@ else {
     return $m->decline;
 }
 
-$squisher = new RT::CSS::Squish unless $squisher;
+$squisher = RT::CSS::Squish->new unless $squisher;
 $squisher->{'mason'} = $m;
 
 $m->out( $squisher->concatenate( $path ) );
diff --git a/share/html/REST/1.0/Forms/attachment/default b/share/html/REST/1.0/Forms/attachment/default
index b53f6fd..d70df0c 100644
--- a/share/html/REST/1.0/Forms/attachment/default
+++ b/share/html/REST/1.0/Forms/attachment/default
@@ -54,7 +54,7 @@ $args => undef
 <%INIT>
 my @data;
 my ($c, $o, $k, $e) = ("", [], {}, "");
-my $attachment = new RT::Attachment $session{CurrentUser};
+my $attachment = RT::Attachment->new( $session{CurrentUser} );
 
 $attachment->Load($id);
 unless ( $attachment->Id ) {
diff --git a/share/html/REST/1.0/Forms/group/customfields b/share/html/REST/1.0/Forms/group/customfields
index b7b6792..ea5afdb 100644
--- a/share/html/REST/1.0/Forms/group/customfields
+++ b/share/html/REST/1.0/Forms/group/customfields
@@ -55,7 +55,7 @@ $changes => {}
 <%perl>
 my @comments;
 my ($c, $o, $k, $e) = ("", [], {}, 0);
-my $group = new RT::Group $session{CurrentUser};
+my $group = RT::Group->new($session{CurrentUser} );
 
 $group->Load($id);
 if (!$group->Id) {
diff --git a/share/html/REST/1.0/Forms/group/default b/share/html/REST/1.0/Forms/group/default
index 22ecf58..9be3593 100644
--- a/share/html/REST/1.0/Forms/group/default
+++ b/share/html/REST/1.0/Forms/group/default
@@ -57,7 +57,7 @@ $changes => {}
 my @comments;
 my ($c, $o, $k, $e) = ("", [], {}, 0);
 my %data = %$changes;
-my $group = new RT::Group $session{CurrentUser};
+my $group = RT::Group->new($session{CurrentUser} );
 my @fields = qw(Name Description);
 my %fields = map { lc $_ => $_ } @fields;
 
diff --git a/share/html/REST/1.0/Forms/group/ns b/share/html/REST/1.0/Forms/group/ns
index ec85fae..501beaa 100644
--- a/share/html/REST/1.0/Forms/group/ns
+++ b/share/html/REST/1.0/Forms/group/ns
@@ -53,7 +53,7 @@ $id
 <%perl>
 use RT::Groups;
 
-my $groups = new RT::Groups $session{CurrentUser};
+my $groups = RT::Groups->new( $session{CurrentUser} );
 $groups->Limit(FIELD => 'Name', OPERATOR => '=', VALUE => $id);
 if ($groups->Count == 0) {
     return (0, "No group named $id exists.");
diff --git a/share/html/REST/1.0/Forms/queue/customfields b/share/html/REST/1.0/Forms/queue/customfields
index 87f925c..0093070 100644
--- a/share/html/REST/1.0/Forms/queue/customfields
+++ b/share/html/REST/1.0/Forms/queue/customfields
@@ -55,7 +55,7 @@ $changes => {}
 <%perl>
 my @comments;
 my ($c, $o, $k, $e) = ("", [], {}, 0);
-my $queue = new RT::Queue $session{CurrentUser};
+my $queue = RT::Queue->new($session{CurrentUser} );
 
 $queue->Load($id);
 if (!$queue->Id) {
diff --git a/share/html/REST/1.0/Forms/queue/default b/share/html/REST/1.0/Forms/queue/default
index d42fef9..5c5f901 100755
--- a/share/html/REST/1.0/Forms/queue/default
+++ b/share/html/REST/1.0/Forms/queue/default
@@ -57,7 +57,7 @@ $changes => {}
 my @comments;
 my ($c, $o, $k, $e) = ("", [], {}, 0);
 my %data = %$changes;
-my $queue = new RT::Queue $session{CurrentUser};
+my $queue = RT::Queue->new($session{CurrentUser} );
 my @fields = qw(Name Description CorrespondAddress CommentAddress
                 InitialPriority FinalPriority DefaultDueIn);
 my %fields = map { lc $_ => $_ } @fields;
diff --git a/share/html/REST/1.0/Forms/queue/ns b/share/html/REST/1.0/Forms/queue/ns
index a46431b..be985c0 100755
--- a/share/html/REST/1.0/Forms/queue/ns
+++ b/share/html/REST/1.0/Forms/queue/ns
@@ -53,7 +53,7 @@ $id
 <%perl>
 use RT::Queues;
 
-my $queues = new RT::Queues $session{CurrentUser};
+my $queues = RT::Queues->new($session{CurrentUser} );
 $queues->Limit(FIELD => 'Name', OPERATOR => '=', VALUE => $id);
 if ($queues->Count == 0) {
     return (0, "No queue named $id exists.");
diff --git a/share/html/REST/1.0/Forms/queue/ticketcustomfields b/share/html/REST/1.0/Forms/queue/ticketcustomfields
index 61ca19d..6e0b4a2 100644
--- a/share/html/REST/1.0/Forms/queue/ticketcustomfields
+++ b/share/html/REST/1.0/Forms/queue/ticketcustomfields
@@ -55,7 +55,7 @@ $changes => {}
 <%perl>
 my @comments;
 my ($c, $o, $k, $e) = ("", [], {}, 0);
-my $queue = new RT::Queue $session{CurrentUser};
+my $queue = RT::Queue->new($session{CurrentUser} );
 
 $queue->Load($id);
 if (!$queue->Id) {
diff --git a/share/html/REST/1.0/Forms/ticket/attachments b/share/html/REST/1.0/Forms/ticket/attachments
index ac14161..6a3087b 100755
--- a/share/html/REST/1.0/Forms/ticket/attachments
+++ b/share/html/REST/1.0/Forms/ticket/attachments
@@ -54,7 +54,7 @@ $args => undef
 <%INIT>
 my @data;
 my ($c, $o, $k, $e) = ("", [], {}, "");
-my $ticket = new RT::Ticket $session{CurrentUser};
+my $ticket = RT::Ticket->new($session{CurrentUser} );
 
 $ticket->Load($id);
 unless ($ticket->Id) {
@@ -76,7 +76,7 @@ if ($aid) {
     unless ($aid =~ /^\d+$/) {
         return [ "# Invalid attachment id: $aid", [], {}, 1 ];
     }
-    my $attachment = new RT::Attachment $session{CurrentUser};
+    my $attachment = RT::Attachment->new( $session{CurrentUser} );
     $attachment->Load($aid);
     unless ($attachment->Id eq $aid) {
         return [ "# Invalid attachment id: $aid", [], {}, 1 ];
diff --git a/share/html/REST/1.0/Forms/ticket/comment b/share/html/REST/1.0/Forms/ticket/comment
index c8d548a..9d4845f 100755
--- a/share/html/REST/1.0/Forms/ticket/comment
+++ b/share/html/REST/1.0/Forms/ticket/comment
@@ -60,7 +60,7 @@ use File::Temp qw(tempfile);
 $RT::Logger->debug("Got ticket id=$id for comment");
 $RT::Logger->debug("Got args @{[keys(%changes)]}.");
 
-my $ticket = new RT::Ticket $session{CurrentUser};
+my $ticket = RT::Ticket->new($session{CurrentUser} );
 my ($c, $o, $k, $e) = ("", [], {}, 0);
 
 # http://.../REST/1.0/ticket/1/comment
diff --git a/share/html/REST/1.0/Forms/ticket/default b/share/html/REST/1.0/Forms/ticket/default
index 76635c8..34c4e1a 100755
--- a/share/html/REST/1.0/Forms/ticket/default
+++ b/share/html/REST/1.0/Forms/ticket/default
@@ -62,7 +62,7 @@ my $cf_spec = RT::Interface::REST->custom_field_spec(1);
 my @comments;
 my ($c, $o, $k, $e) = ("", [], {}, 0);
 my %data   = %$changes;
-my $ticket = new RT::Ticket $session{CurrentUser};
+my $ticket = RT::Ticket->new($session{CurrentUser} );
 my @dates  = qw(Created Starts Started Due Resolved Told LastUpdated);
 my @people = qw(Requestors Cc AdminCc);
 my @create = qw(Queue Requestor Subject Cc AdminCc Owner Status Priority
@@ -92,9 +92,9 @@ else {
     if (!keys(%data)) {
         # GET ticket/new: Return a suitable default form.
         # We get defaults from queue/1 (XXX: What if it isn't there?).
-        my $due = new RT::Date $session{CurrentUser};
-        my $queue = new RT::Queue $session{CurrentUser};
-        my $starts = new RT::Date $session{CurrentUser};
+        my $due = RT::Date->new( $session{CurrentUser} );
+        my $queue = RT::Queue->new( $session{CurrentUser} );
+        my $starts = RT::Date->new( $session{CurrentUser} );
         $queue->Load(1);
         $due->SetToNow;
         $due->AddDays($queue->DefaultDueIn) if $queue->DefaultDueIn;
@@ -132,7 +132,7 @@ else {
         foreach my $k (keys %data) {
             # flexibly parse any dates
             if ($dates{lc $k}) {
-                my $time = new RT::Date $session{CurrentUser};
+                my $time = RT::Date->new( $session{CurrentUser} );
                 $time->Set(Format => 'unknown', Value => $data{$k});
                 $data{$k} = $time->ISO;
             }
@@ -205,14 +205,14 @@ if (!keys(%data)) {
         push @data, [ $key => [ $ticket->$key->MemberEmailAddresses ] ];
     }
 
-    $time = new RT::Date ($session{CurrentUser});
+    $time = RT::Date->new( ($session{CurrentUser}) );
     foreach $key (@dates) {
 	next unless (!%$fields || (exists $fields->{lc $key}));
         $time->Set(Format => 'sql', Value => $ticket->$key);
         push @data, [ $key => $time->AsString ];
     }
 
-    $time = new RT::Date ($session{CurrentUser});
+    $time = RT::Date->new( ($session{CurrentUser}) );
     foreach $key (qw(TimeEstimated TimeWorked TimeLeft)) {
 	next unless (!%$fields || (exists $fields->{lc $key}));
         $val = $ticket->$key || 0;
@@ -295,7 +295,7 @@ else {
 
             $set = "Set$key";
 
-            my $time = new RT::Date $session{CurrentUser};
+            my $time = RT::Date->new( $session{CurrentUser} );
             $time->Set(Format => 'sql', Value => $ticket->$key);
             next if ($val =~ /^not set$/i || $val eq $time->AsString);
 
diff --git a/share/html/REST/1.0/Forms/ticket/history b/share/html/REST/1.0/Forms/ticket/history
index c2aa35a..fd9c677 100755
--- a/share/html/REST/1.0/Forms/ticket/history
+++ b/share/html/REST/1.0/Forms/ticket/history
@@ -54,7 +54,7 @@ $format => undef
 $fields => undef
 </%ARGS>
 <%INIT>
-my $ticket = new RT::Ticket $session{CurrentUser};
+my $ticket = RT::Ticket->new($session{CurrentUser} );
 my ($c, $o, $k, $e) = ("", [], {}, "");
 
 $ticket->Load($id);
@@ -100,7 +100,7 @@ if ($type) {
 
 if ($tid) {
     my @data;
-    my $t = new RT::Transaction $session{CurrentUser};
+    my $t = RT::Transaction->new( $session{CurrentUser} );
     
     # this paragraph limits the transaction ID query to transactions on this ticket. 
     # Otherwise you can query any transaction from any ticket, which makes no sense.
@@ -137,7 +137,7 @@ if ($tid) {
 
 
     if (!%$fields || exists $fields->{lc 'Content'}) {    
-	my $creator = new RT::User $session{CurrentUser};
+	my $creator = RT::User->new( $session{CurrentUser} );
 	$creator->Load($t->Creator);
 	push @data, [ Creator    => $creator->Name   ];
     }
diff --git a/share/html/REST/1.0/Forms/ticket/links b/share/html/REST/1.0/Forms/ticket/links
index fb9ee8f..0e41531 100755
--- a/share/html/REST/1.0/Forms/ticket/links
+++ b/share/html/REST/1.0/Forms/ticket/links
@@ -54,7 +54,7 @@ $changes => undef
 </%ARGS>
 <%INIT>
 my @data;
-my $ticket = new RT::Ticket $session{CurrentUser};
+my $ticket = RT::Ticket->new($session{CurrentUser} );
 
 $ticket->Load($id);
 if (!$ticket->Id) {
@@ -96,8 +96,8 @@ if ($changes) {
             my %new;
             foreach my $nkey (@{vsplit($val)}) {
                 if ($nkey =~ /^\d+$/) {
-                    my $uri = new RT::URI $session{CurrentUser};
-                    my $tick = new RT::Ticket $session{CurrentUser};
+                    my $uri = RT::URI->new( $session{CurrentUser} );
+                    my $tick = RT::Ticket->new( $session{CurrentUser} );
                     $tick->Load($nkey);
                     if ($tick->Id) {
                         $nkey = $uri->FromObject($tick);
diff --git a/share/html/REST/1.0/Forms/ticket/merge b/share/html/REST/1.0/Forms/ticket/merge
index 360ddd7..e8c74f8 100755
--- a/share/html/REST/1.0/Forms/ticket/merge
+++ b/share/html/REST/1.0/Forms/ticket/merge
@@ -56,8 +56,8 @@ use RT::Interface::REST;
 
 my $into = $args;
 
-my $ticket = new RT::Ticket $session{CurrentUser};
-my $ticket_into = new RT::Ticket $session{CurrentUser};
+my $ticket = RT::Ticket->new($session{CurrentUser} );
+my $ticket_into = RT::Ticket->new( $session{CurrentUser} );
 my ($c, $o, $k, $e) = ("", [], {}, 0);
 
 # http://.../REST/1.0/ticket/1/merge/6  (merges ticket 1 into ticket 6)
diff --git a/share/html/REST/1.0/Forms/ticket/take b/share/html/REST/1.0/Forms/ticket/take
index d0bf13e..7ddea90 100755
--- a/share/html/REST/1.0/Forms/ticket/take
+++ b/share/html/REST/1.0/Forms/ticket/take
@@ -54,7 +54,7 @@ $id
 <%INIT>
 use RT::Interface::REST;
 
-my $ticket = new RT::Ticket $session{CurrentUser};
+my $ticket = RT::Ticket->new( $session{CurrentUser} );
 my ($c, $o, $k, $e) = ("", [], {}, 0);
 
 # http://.../REST/1.0/ticket/1/take
diff --git a/share/html/REST/1.0/Forms/transaction/default b/share/html/REST/1.0/Forms/transaction/default
index 46488d2..7101e3d 100644
--- a/share/html/REST/1.0/Forms/transaction/default
+++ b/share/html/REST/1.0/Forms/transaction/default
@@ -54,7 +54,7 @@ $format => undef
 $fields => undef
 </%ARGS>
 <%INIT>
-my $trans = new RT::Transactions $session{CurrentUser};
+my $trans = RT::Transactions->new($session{CurrentUser} );
 my ($c, $o, $k, $e) = ("", [], {} , "");
 
 chomp $args;
@@ -65,7 +65,7 @@ $trans->Limit(FIELD => 'Id', OPERATOR => '=', VALUE => $tid);
 
 if ($tid) {
     my @data;
-    my $t = new RT::Transaction $session{CurrentUser};
+    my $t = RT::Transaction->new( $session{CurrentUser} );
     $t->Load($tid);
     if ($format eq "l") {
       push @data, [ id    => $t->Id   ];
@@ -89,7 +89,7 @@ if ($tid) {
        	if (!%$fields || exists $fields->{lc 'Content'});
       
       if (!%$fields || exists $fields->{lc 'Content'}) {    
-  	    my $creator = new RT::User $session{CurrentUser};
+  	    my $creator = RT::User->new( $session{CurrentUser} );
   	    $creator->Load($t->Creator);
   	    push @data, [ Creator    => $creator->Name   ];
       }
diff --git a/share/html/REST/1.0/Forms/user/default b/share/html/REST/1.0/Forms/user/default
index 908eab2..7fd96e9 100755
--- a/share/html/REST/1.0/Forms/user/default
+++ b/share/html/REST/1.0/Forms/user/default
@@ -56,7 +56,7 @@ $changes => {}
 my @comments;
 my ($c, $o, $k, $e) = ("", [], {}, 0);
 my %data = %$changes;
-my $user = new RT::User $session{CurrentUser};
+my $user = RT::User->new( $session{CurrentUser} );
 my @fields = qw(RealName NickName Gecos Organization Address1 Address2 City
                 State Zip Country HomePhone WorkPhone MobilePhone PagerPhone
                 FreeformContactInfo Comments Signature Lang EmailEncoding
diff --git a/share/html/REST/1.0/Forms/user/ns b/share/html/REST/1.0/Forms/user/ns
index 16c8902..8470e74 100755
--- a/share/html/REST/1.0/Forms/user/ns
+++ b/share/html/REST/1.0/Forms/user/ns
@@ -56,7 +56,7 @@ use RT::Users;
 my $field = "Name";
 $field = "EmailAddress" if $id =~ /\@/;
 
-my $users = new RT::Users $session{CurrentUser};
+my $users = RT::Users->new( $session{CurrentUser} );
 $users->Limit(FIELD => $field, OPERATOR => '=', VALUE => $id);
 if ($users->Count == 0) {
     return (0, "No user named $id exists.");
diff --git a/share/html/REST/1.0/search/ticket b/share/html/REST/1.0/search/ticket
index bd03caf..d67e42f 100755
--- a/share/html/REST/1.0/search/ticket
+++ b/share/html/REST/1.0/search/ticket
@@ -57,7 +57,7 @@ $fields => undef
 use RT::Interface::REST;
 my $output = "";
 my $status = "200 Ok";
-my $tickets = new RT::Tickets $session{CurrentUser};
+my $tickets = RT::Tickets->new( $session{CurrentUser} );
 
 # Parse and validate any field specifications.
 my $field  = RT::Interface::REST->field_spec;
diff --git a/share/html/REST/1.0/ticket/comment b/share/html/REST/1.0/ticket/comment
index c0a3c47..39e3b0d 100755
--- a/share/html/REST/1.0/ticket/comment
+++ b/share/html/REST/1.0/ticket/comment
@@ -56,7 +56,7 @@ use LWP::MediaTypes;
 use RT::Interface::REST;
 use File::Temp qw(tempfile);
 
-my $ticket = new RT::Ticket $session{CurrentUser};
+my $ticket = RT::Ticket->new( $session{CurrentUser} );
 my $object = $r->path_info;
 my $status = "200 Ok";
 my $output;
diff --git a/share/html/REST/1.0/ticket/link b/share/html/REST/1.0/ticket/link
index 4f4ff25..e92e4b1 100755
--- a/share/html/REST/1.0/ticket/link
+++ b/share/html/REST/1.0/ticket/link
@@ -58,7 +58,7 @@ use RT::Interface::REST;
 
 my $output;
 my $status = "200 Ok";
-my $ticket = new RT::Ticket $session{CurrentUser};
+my $ticket = RT::Ticket->new( $session{CurrentUser} );
 my $object = $r->path_info;
 
 my @fields = qw(DependsOn DependedOnBy RefersTo ReferredToBy HasMember MemberOf);
diff --git a/share/html/REST/1.0/ticket/merge b/share/html/REST/1.0/ticket/merge
index fe8fdad..6f859d4 100755
--- a/share/html/REST/1.0/ticket/merge
+++ b/share/html/REST/1.0/ticket/merge
@@ -56,7 +56,7 @@ use RT::Interface::REST;
 
 my $output;
 my $status = "200 Ok";
-my $ticket = new RT::Ticket $session{CurrentUser};
+my $ticket = RT::Ticket->new( $session{CurrentUser} );
 my $object = $r->path_info;
 
 # http://.../REST/1.0/ticket/merge/1
diff --git a/share/html/Search/Elements/DisplayOptions b/share/html/Search/Elements/DisplayOptions
index f69fb26..672ea48 100644
--- a/share/html/Search/Elements/DisplayOptions
+++ b/share/html/Search/Elements/DisplayOptions
@@ -101,7 +101,7 @@ selected="selected"
 </&>
 
 <%INIT>
-my $tickets = new RT::Tickets($session{'CurrentUser'});
+my $tickets = RT::Tickets->new($session{'CurrentUser'});
 my %fields = %{$tickets->FIELDS};
 map { $fields{$_}->[0] =~ /^(?:ENUM|INT|DATE|STRING|ID)$/ || delete $fields{$_} } keys %fields;
 delete $fields{'EffectiveId'};
diff --git a/share/html/Search/Elements/ResultsRSSView b/share/html/Search/Elements/ResultsRSSView
index f3b416a..e79c51b 100644
--- a/share/html/Search/Elements/ResultsRSSView
+++ b/share/html/Search/Elements/ResultsRSSView
@@ -102,7 +102,7 @@ $r->content_type('application/rss+xml');
 
         # create an RSS 1.0 file (http://purl.org/rss/1.0/)
         use XML::RSS;
-        my $rss = new XML::RSS (version => '1.0');
+        my $rss = XML::RSS->new(version => '1.0');
         $rss->channel(
           title        => RT->Config->Get('rtname').": Search " . $ARGS{'Query'},
           link         => RT->Config->Get('WebURL'),
diff --git a/share/html/Search/Elements/SelectGroup b/share/html/Search/Elements/SelectGroup
index 2ed965d..f4cfcf6 100644
--- a/share/html/Search/Elements/SelectGroup
+++ b/share/html/Search/Elements/SelectGroup
@@ -55,7 +55,7 @@
 </select>
 
 <%INIT>
-my $groups = new RT::Groups($session{'CurrentUser'});
+my $groups = RT::Groups->new($session{'CurrentUser'});
 $groups->Limit(FIELD => 'Domain', OPERATOR => '=', VALUE => $Domain);
 
 </%INIT>
diff --git a/share/html/Search/Simple.html b/share/html/Search/Simple.html
index dc5c14d..08945e5 100644
--- a/share/html/Search/Simple.html
+++ b/share/html/Search/Simple.html
@@ -78,7 +78,7 @@ my $title = loc("Search for tickets");
 use RT::Search::Googleish;
 
 if ($q) {
-    my $tickets = new RT::Tickets( $session{'CurrentUser'} );
+    my $tickets = RT::Tickets->new( $session{'CurrentUser'} );
     $m->callback( %ARGS, query => \$q, CallbackName => 'ModifyQuery' );
 
     if ($q =~ /^#?(\d+)$/) {
diff --git a/share/html/SelfService/Display.html b/share/html/SelfService/Display.html
index 4f227b1..888573f 100755
--- a/share/html/SelfService/Display.html
+++ b/share/html/SelfService/Display.html
@@ -100,7 +100,7 @@ $m->callback( ARGSRef => \%ARGS, CallbackName => 'Initial' );
 # to deal
 my @id = ( ref $id eq 'ARRAY' ) ? @{$id} : ($id);
 
-my $Ticket = new RT::Ticket( $session{'CurrentUser'} );
+my $Ticket = RT::Ticket->new( $session{'CurrentUser'} );
 
 # store the uploaded attachment in session
 if ( $ARGS{'Attach'} ) {    # attachment?
@@ -121,7 +121,7 @@ if ( defined ($id[0]) && $id[0] eq 'new' ) {
 
     # {{{ Create a new ticket
 
-    my $Queue = new RT::Queue( $session{'CurrentUser'} );
+    my $Queue = RT::Queue->new( $session{'CurrentUser'} );
     unless ( $Queue->Load( $ARGS{'Queue'} ) ) {
         $m->comp( 'Error.html', Why => loc('Queue not found') );
         $m->abort;
diff --git a/share/html/Ticket/Attachment/WithHeaders/dhandler b/share/html/Ticket/Attachment/WithHeaders/dhandler
index 7dc46d3..1cfeaa6 100644
--- a/share/html/Ticket/Attachment/WithHeaders/dhandler
+++ b/share/html/Ticket/Attachment/WithHeaders/dhandler
@@ -53,7 +53,7 @@
         Abort("Corrupted attachment URL");
     }
 
-    my $AttachmentObj = new RT::Attachment( $session{'CurrentUser'} );
+    my $AttachmentObj = RT::Attachment->new( $session{'CurrentUser'} );
     $AttachmentObj->Load( $id );
     unless ( $AttachmentObj->id ) {
         Abort("Couldn't load attachment #$id");
diff --git a/share/html/Ticket/Attachment/dhandler b/share/html/Ticket/Attachment/dhandler
index 5297082..79eb844 100755
--- a/share/html/Ticket/Attachment/dhandler
+++ b/share/html/Ticket/Attachment/dhandler
@@ -55,7 +55,7 @@
     else {
         Abort("Corrupted attachment URL.");
     }
-     my $AttachmentObj = new RT::Attachment($session{'CurrentUser'});
+     my $AttachmentObj = RT::Attachment->new($session{'CurrentUser'});
      $AttachmentObj->Load($attach) || Abort("Attachment '$attach' could not be loaded");
 
 
diff --git a/share/html/Ticket/Create.html b/share/html/Ticket/Create.html
index 651c610..5ec1403 100755
--- a/share/html/Ticket/Create.html
+++ b/share/html/Ticket/Create.html
@@ -334,7 +334,7 @@ my @results;
 
 my $title = loc("Create a new ticket");
 
-my $QueueObj = new RT::Queue($session{'CurrentUser'});
+my $QueueObj = RT::Queue->new($session{'CurrentUser'});
 $QueueObj->Load($Queue) || Abort(loc("Queue could not be loaded."));
 
 $m->callback( QueueObj => $QueueObj, title => \$title, results => \@results, ARGSRef => \%ARGS );
diff --git a/share/html/Ticket/Display.html b/share/html/Ticket/Display.html
index 21be795..a3e49ba 100755
--- a/share/html/Ticket/Display.html
+++ b/share/html/Ticket/Display.html
@@ -104,7 +104,7 @@ unless ($id || $TicketObj) {
 if ($ARGS{'id'} eq 'new') {
     # {{{ Create a new ticket
 
-    my $Queue = new RT::Queue( $session{'CurrentUser'} );
+    my $Queue = RT::Queue->new( $session{'CurrentUser'} );
     $Queue->Load($ARGS{'Queue'});
     unless ( $Queue->id ) {
         Abort('Queue not found');
diff --git a/share/html/Ticket/Elements/ShowHistory b/share/html/Ticket/Elements/ShowHistory
index 1833ecd..acd71ad 100755
--- a/share/html/Ticket/Elements/ShowHistory
+++ b/share/html/Ticket/Elements/ShowHistory
@@ -135,7 +135,7 @@ $m->flush_buffer();
 </div>
 % }
 <%INIT>
-my $Transactions = new RT::Transactions($session{'CurrentUser'});
+my $Transactions = RT::Transactions->new($session{'CurrentUser'});
 if ($Tickets) {
     while (my $t = $Tickets->Next) {
         $Transactions->LimitToTicket($t->id);
diff --git a/share/html/Ticket/ShowEmailRecord.html b/share/html/Ticket/ShowEmailRecord.html
index 77f0f59..25f0506 100644
--- a/share/html/Ticket/ShowEmailRecord.html
+++ b/share/html/Ticket/ShowEmailRecord.html
@@ -79,7 +79,7 @@ $show = sub {
     $m->out( '</pre></div>' );
 };
 
-my $AttachmentObj = new RT::Attachment($session{'CurrentUser'});
+my $AttachmentObj = RT::Attachment->new($session{'CurrentUser'});
 $AttachmentObj->Load($Attachment) || Abort(loc("Attachment '[_1]' could not be loaded", $Attachment));
 unless ( $AttachmentObj->id ) {
     Abort(loc("Attachment '[_1]' could not be loaded", $Attachment));
diff --git a/share/html/User/Groups/Members.html b/share/html/User/Groups/Members.html
index c128e3b..34d591f 100755
--- a/share/html/User/Groups/Members.html
+++ b/share/html/User/Groups/Members.html
@@ -106,7 +106,7 @@
 
 <%INIT>
 
-my $Group = new RT::Group($session{'CurrentUser'});
+my $Group = RT::Group->new($session{'CurrentUser'});
 $Group->Load($id) ;
 
 unless ($Group->id) {
diff --git a/share/html/index.html b/share/html/index.html
index 49d524a..72cbad1 100755
--- a/share/html/index.html
+++ b/share/html/index.html
@@ -93,7 +93,7 @@ $m->callback( ARGSRef => \%ARGS, results => \@results, CallbackName => 'Initial'
               skip_create => \$skip_create );
 
 if ( $ARGS{'QuickCreate'} ) {
-    my $QueueObj = new RT::Queue($session{'CurrentUser'});
+    my $QueueObj = RT::Queue->new($session{'CurrentUser'});
     $QueueObj->Load($ARGS{Queue}) or Abort(loc("Queue could not be loaded."));
     
     my $CFs = $QueueObj->TicketCustomFields();
diff --git a/t/00-mason-syntax.t b/t/00-mason-syntax.t
index 0584f63..0eb993a 100644
--- a/t/00-mason-syntax.t
+++ b/t/00-mason-syntax.t
@@ -33,7 +33,7 @@ sub compile_file {
 
     my $text = decode_utf8(RT::Test->file_content($file));
 
-    my $compiler = new HTML::Mason::Compiler::ToObject;
+    my $compiler = HTML::Mason::Compiler::ToObject->new;
     $compiler->compile(
         comp_source => $text,
         name => 'my',
diff --git a/t/clicky.t b/t/clicky.t
index 8d5227e..9baa2af 100644
--- a/t/clicky.t
+++ b/t/clicky.t
@@ -26,7 +26,7 @@ use_ok('MIME::Entity');
 
 my $CurrentUser = $RT::SystemUser;
 
-my $queue = new RT::Queue($CurrentUser);
+my $queue = RT::Queue->new($CurrentUser);
 $queue->Load('General') || Abort(loc("Queue could not be loaded."));
 
 my $message = MIME::Entity->build(
@@ -41,7 +41,7 @@ Best regards. BestPractical Team.
 END
 );
 
-my $ticket = new RT::Ticket( $CurrentUser );
+my $ticket = RT::Ticket->new( $CurrentUser );
 my ($id) = $ticket->Create(
     Subject => 'test',
     Queue => $queue->Id,
@@ -87,7 +87,7 @@ Best regards. BestPractical Team.
 END
 );
 
-my $ticket = new RT::Ticket($CurrentUser);
+my $ticket = RT::Ticket->new($CurrentUser);
 my ($id) = $ticket->Create(
     Subject => 'test',
     Queue   => $queue->Id,
diff --git a/t/mail/crypt-gnupg.t b/t/mail/crypt-gnupg.t
index cc52dd6..5898da0 100644
--- a/t/mail/crypt-gnupg.t
+++ b/t/mail/crypt-gnupg.t
@@ -286,7 +286,7 @@ diag 'wrong signed/encrypted parts: wrong proto' if $ENV{'TEST_VERBOSE'};
 diag 'verify inline and in attachment signatures' if $ENV{'TEST_VERBOSE'};
 {
     open( my $fh, '<', "$homedir/signed_old_style_with_attachment.eml" ) or die $!;
-    my $parser = new MIME::Parser;
+    my $parser = MIME::Parser->new;
     my $entity = $parser->parse( $fh );
 
     my @parts = RT::Crypt::GnuPG::FindProtectedParts( Entity => $entity );
diff --git a/t/mail/gateway.t b/t/mail/gateway.t
index d57b063..b73314e 100644
--- a/t/mail/gateway.t
+++ b/t/mail/gateway.t
@@ -497,7 +497,7 @@ diag "Testing preservation of binary attachments" if $ENV{'TEST_VERBOSE'};
     is ($acontent, $file, 'The attachment isn\'t screwed up in the database.');
 
     # Grab the binary attachment via the web ui
-    my $ua = new LWP::UserAgent;
+    my $ua = LWP::UserAgent->new;
     my $full_url = "$url/Ticket/Attachment/". $attachment->TransactionId
         ."/". $attachment->id. "/bplogo.gif?&user=root&pass=password";
     my $r = $ua->get( $full_url );
diff --git a/t/shredder/02group_member.t b/t/shredder/02group_member.t
index b68557a..c391f74 100644
--- a/t/shredder/02group_member.t
+++ b/t/shredder/02group_member.t
@@ -71,7 +71,7 @@ init_db();
 	is( $user->id, $uid, "id is correct" );
 
 	use RT::Queue;
-	my $queue = new RT::Queue( $RT::SystemUser );
+	my $queue = RT::Queue->new( $RT::SystemUser );
 	$queue->Load('general');
 	ok( $queue->id, "queue loaded succesfully" );
 
diff --git a/t/shredder/03plugin.t b/t/shredder/03plugin.t
index 190f40a..cf51e44 100644
--- a/t/shredder/03plugin.t
+++ b/t/shredder/03plugin.t
@@ -17,7 +17,7 @@ my @PLUGINS = sort qw(Attachments Base Objects SQLDump Summary Tickets Users);
 
 use_ok('RT::Shredder::Plugin');
 {
-    my $plugin = new RT::Shredder::Plugin;
+    my $plugin = RT::Shredder::Plugin->new;
     isa_ok($plugin, 'RT::Shredder::Plugin');
     my %plugins = $plugin->List;
     cmp_deeply( [sort keys %plugins], [@PLUGINS], "correct plugins" );
@@ -28,7 +28,7 @@ use_ok('RT::Shredder::Plugin');
 }
 { # reblessing on LoadByName
     foreach (@PLUGINS) {
-        my $plugin = new RT::Shredder::Plugin;
+        my $plugin = RT::Shredder::Plugin->new;
         isa_ok($plugin, 'RT::Shredder::Plugin');
         my ($status, $msg) = $plugin->LoadByName( $_ );
         ok($status, "loaded plugin by name") or diag("error: $msg");
@@ -36,7 +36,7 @@ use_ok('RT::Shredder::Plugin');
     }
 }
 { # error checking in LoadByName
-    my $plugin = new RT::Shredder::Plugin;
+    my $plugin = RT::Shredder::Plugin->new;
     isa_ok($plugin, 'RT::Shredder::Plugin');
     my ($status, $msg) = $plugin->LoadByName;
     ok(!$status, "not loaded plugin - empty name");
diff --git a/t/shredder/03plugin_summary.t b/t/shredder/03plugin_summary.t
index 30606af..606cd67 100644
--- a/t/shredder/03plugin_summary.t
+++ b/t/shredder/03plugin_summary.t
@@ -15,7 +15,7 @@ BEGIN {
 
 
 use_ok('RT::Shredder::Plugin');
-my $plugin_obj = new RT::Shredder::Plugin;
+my $plugin_obj = RT::Shredder::Plugin->new;
 isa_ok($plugin_obj, 'RT::Shredder::Plugin');
 my ($status, $msg) = $plugin_obj->LoadByName('Summary');
 ok($status, 'loaded summary plugin') or diag "error: $msg";
diff --git a/t/shredder/03plugin_tickets.t b/t/shredder/03plugin_tickets.t
index 3d742ff..7a533b6 100644
--- a/t/shredder/03plugin_tickets.t
+++ b/t/shredder/03plugin_tickets.t
@@ -16,7 +16,7 @@ BEGIN {
 
 use_ok('RT::Shredder::Plugin::Tickets');
 {
-    my $plugin = new RT::Shredder::Plugin::Tickets;
+    my $plugin = RT::Shredder::Plugin::Tickets->new;
     isa_ok($plugin, 'RT::Shredder::Plugin::Tickets');
 
     is(lc $plugin->Type, 'search', 'correct type');
@@ -36,7 +36,7 @@ use_ok('RT::Tickets');
     my ($cid) = $child->Create( Subject => 'child', Queue => 1, MemberOf => $pid );
     ok( $cid, "created new ticket" );
 
-    my $plugin = new RT::Shredder::Plugin::Tickets;
+    my $plugin = RT::Shredder::Plugin::Tickets->new;
     isa_ok($plugin, 'RT::Shredder::Plugin::Tickets');
 
     my ($status, $msg, @objs);
@@ -78,7 +78,7 @@ cmp_deeply( dump_current_and_savepoint('clean'), "current DB equal to savepoint"
     my ($status, $msg) = $child->AddLink( Target => $pid, Type => 'DependsOn' );
     ok($status, "added reqursive link") or diag "error: $msg";
 
-    my $plugin = new RT::Shredder::Plugin::Tickets;
+    my $plugin = RT::Shredder::Plugin::Tickets->new;
     isa_ok($plugin, 'RT::Shredder::Plugin::Tickets');
 
     my (@objs);
@@ -120,7 +120,7 @@ cmp_deeply( dump_current_and_savepoint('clean'), "current DB equal to savepoint"
     my ($cid2) = $child2->Create( Subject => 'child', Queue => 1, MemberOf => $pid, Status => 'resolved' );
     ok( $cid2, "created new ticket" );
 
-    my $plugin = new RT::Shredder::Plugin::Tickets;
+    my $plugin = RT::Shredder::Plugin::Tickets->new;
     isa_ok($plugin, 'RT::Shredder::Plugin::Tickets');
 
     my ($status, $msg) = $plugin->TestArgs( query => 'Status = "resolved"', apply_query_to_linked => 1 );
diff --git a/t/shredder/03plugin_users.t b/t/shredder/03plugin_users.t
index 45fc8a2..e49dd7b 100644
--- a/t/shredder/03plugin_users.t
+++ b/t/shredder/03plugin_users.t
@@ -18,7 +18,7 @@ my @ARGS = sort qw(limit status name member_of email replace_relations no_ticket
 
 use_ok('RT::Shredder::Plugin::Users');
 {
-    my $plugin = new RT::Shredder::Plugin::Users;
+    my $plugin = RT::Shredder::Plugin::Users->new;
     isa_ok($plugin, 'RT::Shredder::Plugin::Users');
 
     is(lc $plugin->Type, 'search', 'correct type');
diff --git a/t/shredder/utils.pl b/t/shredder/utils.pl
index 5424331..b05b42a 100644
--- a/t/shredder/utils.pl
+++ b/t/shredder/utils.pl
@@ -192,7 +192,7 @@ Creates and returns a new RT::Shredder object.
 
 sub shredder_new
 {
-    my $obj = new RT::Shredder;
+    my $obj = RT::Shredder->new;
 
     my $file = File::Spec->catfile( create_tmpdir(), test_name() .'.XXXX.sql' );
     $obj->AddDumpPlugin( Arguments => {
diff --git a/t/ticket/link_search.t b/t/ticket/link_search.t
index 1bf7dc6..687c01b 100644
--- a/t/ticket/link_search.t
+++ b/t/ticket/link_search.t
@@ -12,17 +12,17 @@ use RT::Test tests => 63;
 #Get the current user all loaded
 my $CurrentUser = $RT::SystemUser;
 
-my $queue = new RT::Queue($CurrentUser);
+my $queue = RT::Queue->new($CurrentUser);
 $queue->Load('General') || Abort(loc("Queue could not be loaded."));
 
-my $child_ticket = new RT::Ticket( $CurrentUser );
+my $child_ticket = RT::Ticket->new( $CurrentUser );
 my ($childid) = $child_ticket->Create(
     Subject => 'test child',
     Queue => $queue->Id,
 );
 ok($childid, "We created a child ticket");
 
-my $parent_ticket = new RT::Ticket( $CurrentUser );
+my $parent_ticket = RT::Ticket->new( $CurrentUser );
 my ($parentid) = $parent_ticket->Create(
     Subject => 'test parent',
     Children => [ $childid ],
@@ -155,7 +155,7 @@ while (my $t = $Collection->Next) {
 ok( $has{$parentid}, "The collection has our parent - $parentid");
 ok( !$has{$childid}, "The collection doesn't have our child - $childid");
 
-my $grand_child_ticket = new RT::Ticket( $CurrentUser );
+my $grand_child_ticket = RT::Ticket->new( $CurrentUser );
 my ($grand_childid) = $child_ticket->Create(
     Subject => 'test child',
     Queue   => $queue->Id,
@@ -163,7 +163,7 @@ my ($grand_childid) = $child_ticket->Create(
 );
 ok($childid, "We created a grand child ticket");
 
-my $unlinked_ticket = new RT::Ticket( $CurrentUser );
+my $unlinked_ticket = RT::Ticket->new( $CurrentUser );
 my ($unlinked_id) = $child_ticket->Create(
     Subject => 'test unlinked',
     Queue   => $queue->Id,
diff --git a/t/ticket/sort-by-custom-ownership.t b/t/ticket/sort-by-custom-ownership.t
index 9739c5a..b358a99 100644
--- a/t/ticket/sort-by-custom-ownership.t
+++ b/t/ticket/sort-by-custom-ownership.t
@@ -76,8 +76,8 @@ sub check_order {
 
 # The real tests start here
 
-my $cme = new RT::CurrentUser( $me );
-my $metx = new RT::Tickets( $cme );
+my $cme = RT::CurrentUser->new( $me );
+my $metx = RT::Tickets->new( $cme );
 # Make sure we can sort in both directions on a queue specific field.
 $metx->FromSQL(qq[queue="$queue"] );
 $metx->OrderBy( FIELD => "Custom.Ownership", ORDER => 'ASC' );
@@ -90,8 +90,8 @@ check_order( $metx, reverse qw[2 1 6 5 4 3]);
 
 
 
-my $cyou = new RT::CurrentUser( $you );
-my $youtx = new RT::Tickets( $cyou );
+my $cyou = RT::CurrentUser->new( $you );
+my $youtx = RT::Tickets->new( $cyou );
 # Make sure we can sort in both directions on a queue specific field.
 $youtx->FromSQL(qq[queue="$queue"] );
 $youtx->OrderBy( FIELD => "Custom.Ownership", ORDER => 'ASC' );
diff --git a/t/ticket/sort_by_cf.t b/t/ticket/sort_by_cf.t
index 69274ad..7e25884 100644
--- a/t/ticket/sort_by_cf.t
+++ b/t/ticket/sort_by_cf.t
@@ -93,7 +93,7 @@ sub check_order {
 }
 
 # The real tests start here
-my $tx = new RT::Tickets( $RT::SystemUser );
+my $tx = RT::Tickets->new( $RT::SystemUser );
 
 
 # Make sure we can sort in both directions on a queue specific field.
@@ -102,7 +102,7 @@ $tx->OrderBy( FIELD => "CF.${queue}.{Charlie}", ORDER => 'DES' );
 is($tx->Count,2 ,"We found 2 tickets when looking for cf charlie");
 check_order( $tx, 1, 2);
 
-$tx = new RT::Tickets( $RT::SystemUser );
+$tx = RT::Tickets->new( $RT::SystemUser );
 $tx->FromSQL(qq[queue="$queue"] );
 $tx->OrderBy( FIELD => "CF.${queue}.{Charlie}", ORDER => 'ASC' );
 is($tx->Count,2, "We found two tickets when sorting by cf charlie without limiting to it" );
@@ -111,13 +111,13 @@ check_order( $tx, 2, 1);
 # When ordering by _global_ CustomFields, if more than one queue has a
 # CF named Charlie, things will go bad.  So, these results are uniqued
 # in Tickets_Overlay.
-$tx = new RT::Tickets( $RT::SystemUser );
+$tx = RT::Tickets->new( $RT::SystemUser );
 $tx->FromSQL(qq[queue="$queue"] );
 $tx->OrderBy( FIELD => "CF.{Charlie}", ORDER => 'DESC' );
 is($tx->Count,2);
 check_order( $tx, 1, 2);
 
-$tx = new RT::Tickets( $RT::SystemUser );
+$tx = RT::Tickets->new( $RT::SystemUser );
 $tx->FromSQL(qq[queue="$queue"] );
 $tx->OrderBy( FIELD => "CF.{Charlie}", ORDER => 'ASC' );
 is($tx->Count,2);
@@ -133,7 +133,7 @@ $t3->AddCustomFieldValue(Field => $cfA->Id,  Value => '3');
 $t3->AddCustomFieldValue(Field => $cfB->Id,  Value => '2');
 $t3->AddCustomFieldValue(Field => $cfC->Id,  Value => 'AAA');
 
-$tx = new RT::Tickets( $RT::SystemUser );
+$tx = RT::Tickets->new( $RT::SystemUser );
 $tx->FromSQL(qq[queue="$queue"] );
 $tx->OrderByCols(
     { FIELD => "CF.${queue}.{Charlie}", ORDER => 'ASC' },
@@ -142,7 +142,7 @@ $tx->OrderByCols(
 is($tx->Count,3);
 check_order( $tx, 3, 2, 1);
 
-$tx = new RT::Tickets( $RT::SystemUser );
+$tx = RT::Tickets->new( $RT::SystemUser );
 $tx->FromSQL(qq[queue="$queue"] );
 $tx->OrderByCols(
     { FIELD => "CF.${queue}.{Charlie}", ORDER => 'DES' },
@@ -153,7 +153,7 @@ check_order( $tx, 1, 2, 3);
 
 # Reverse the order of the secondary column, which changes the order
 # of the first two tickets.
-$tx = new RT::Tickets( $RT::SystemUser );
+$tx = RT::Tickets->new( $RT::SystemUser );
 $tx->FromSQL(qq[queue="$queue"] );
 $tx->OrderByCols(
     { FIELD => "CF.${queue}.{Charlie}", ORDER => 'ASC' },
@@ -162,7 +162,7 @@ $tx->OrderByCols(
 is($tx->Count,3);
 check_order( $tx, 2, 3, 1);
 
-$tx = new RT::Tickets( $RT::SystemUser );
+$tx = RT::Tickets->new( $RT::SystemUser );
 $tx->FromSQL(qq[queue="$queue"] );
 $tx->OrderByCols(
     { FIELD => "CF.${queue}.{Charlie}", ORDER => 'DES' },

-----------------------------------------------------------------------


More information about the Rt-commit mailing list