[Rt-commit] rt branch, 3.9-trunk, updated. rt-3.8.8-442-g517b964

Jesse Vincent jesse at bestpractical.com
Tue Aug 17 19:13:56 EDT 2010


The branch, 3.9-trunk has been updated
       via  517b964ded8a3359ea0a95ea644d961fb8f212e2 (commit)
       via  1e5327d0bc3d18796587848b23f92cc82fd2ea24 (commit)
      from  ef4d76eed6256abbdca2ddb97bf0e211dc358f81 (commit)

Summary of changes:
 lib/RT.pm.in                                       |    8 ++--
 lib/RT/ACE_Overlay.pm                              |    2 +-
 lib/RT/ACL_Overlay.pm                              |    2 +-
 lib/RT/Attachment_Overlay.pm                       |    6 +-
 lib/RT/Attributes_Overlay.pm                       |    2 +-
 lib/RT/Base.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                      |    6 +-
 lib/RT/Date.pm                                     |    8 ++-
 lib/RT/EmailParser.pm                              |    4 +-
 lib/RT/Group_Overlay.pm                            |    2 +-
 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                                   |   16 +++---
 lib/RT/Scrips_Overlay.pm                           |    2 +-
 lib/RT/Shredder/POD.pm                             |    9 ++--
 lib/RT/Shredder/Plugin.pm                          |    4 +-
 lib/RT/Shredder/Record.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                          |    6 +-
 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/EditCustomFieldDate            |    2 +-
 share/html/Elements/EditCustomFieldDateTime        |    2 +-
 share/html/Elements/SelectQueue                    |    4 +-
 share/html/Elements/SelectTicketSortBy             |    2 +-
 share/html/Elements/ShowCustomFieldDate            |    2 +-
 share/html/Elements/ShowCustomFieldDateTime        |    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 |    4 +-
 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/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/clicky.t                                         |    6 +-
 t/mail/charsets-outgoing.t                         |    2 +-
 t/mail/extractsubjecttag.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 +++---
 118 files changed, 269 insertions(+), 268 deletions(-)

- Log -----------------------------------------------------------------
commit 1e5327d0bc3d18796587848b23f92cc82fd2ea24
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Tue Aug 17 14:19:58 2010 -0400

    Remove use of indirect object syntax programmatically for
        new RT::... -> RT::...->new

diff --git a/lib/RT.pm.in b/lib/RT.pm.in
index da4013b..4722e38 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;
 }
@@ -511,11 +511,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/ACE_Overlay.pm b/lib/RT/ACE_Overlay.pm
index 644b826..aa75672 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 5055fcf..0633e11 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/Attachment_Overlay.pm b/lib/RT/Attachment_Overlay.pm
index 3a87d7e..1f28553 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,
diff --git a/lib/RT/Attributes_Overlay.pm b/lib/RT/Attributes_Overlay.pm
index 7923676..28fcb67 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/Base.pm b/lib/RT/Base.pm
index a8e1754..6e481b0 100755
--- a/lib/RT/Base.pm
+++ b/lib/RT/Base.pm
@@ -87,7 +87,7 @@ sub CurrentUser {
         $self->{'original_user'} = $self->{'user'};
         my $current_user = $_[0];
         if ( ref $current_user eq 'RT::User' ) {
-            $self->{'user'} = new RT::CurrentUser;
+            $self->{'user'} = RT::CurrentUser->new;
             $self->{'user'}->Load( $current_user->id );
         } else {
             $self->{'user'} = $current_user;
diff --git a/lib/RT/Condition/BeforeDue.pm b/lib/RT/Condition/BeforeDue.pm
index 52a5907..aaf59af 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 4ced859..f515f62 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
@@ -143,7 +143,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");
@@ -393,7 +393,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 8969dca..0375e84 100644
--- a/lib/RT/Crypt/GnuPG.pm
+++ b/lib/RT/Crypt/GnuPG.pm
@@ -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( [] );
diff --git a/lib/RT/CurrentUser.pm b/lib/RT/CurrentUser.pm
index ff6e426..fa0b98b 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/CustomField_Overlay.pm b/lib/RT/CustomField_Overlay.pm
index f755b3a..b3a02c6 100755
--- a/lib/RT/CustomField_Overlay.pm
+++ b/lib/RT/CustomField_Overlay.pm
@@ -1283,7 +1283,7 @@ sub AddValueForObject {
     }
     # For date, we need to store Content as ISO date
     if ( $self->Type eq 'DateTime' ) {
-        my $DateObj = new RT::Date( $self->CurrentUser );
+        my $DateObj = RT::Date->new( $self->CurrentUser );
         $DateObj->Set(
             Format => 'unknown',
             Value  => $args{'Content'},
@@ -1294,7 +1294,7 @@ sub AddValueForObject {
 
         # in case user input date with time, let's omit it by setting timezone
         # to utc so "hour" won't affect "day"
-        my $DateObj = new RT::Date( $self->CurrentUser );
+        my $DateObj = RT::Date->new( $self->CurrentUser );
         $DateObj->Set(
             Format   => 'unknown',
             Value    => $args{'Content'},
@@ -1435,7 +1435,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/Group_Overlay.pm b/lib/RT/Group_Overlay.pm
index d424102..16d5beb 100755
--- a/lib/RT/Group_Overlay.pm
+++ b/lib/RT/Group_Overlay.pm
@@ -56,7 +56,7 @@
 =head1 SYNOPSIS
 
 use RT::Group;
-my $group = new RT::Group($CurrentUser);
+my $group = RT::Group->new($CurrentUser);
 
 =head1 DESCRIPTION
 
diff --git a/lib/RT/Handle.pm b/lib/RT/Handle.pm
index 08dfffc..86e4e12 100755
--- a/lib/RT/Handle.pm
+++ b/lib/RT/Handle.pm
@@ -233,13 +233,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'");
@@ -798,7 +798,7 @@ sub InsertData {
             if ( $item->{'Name'} eq 'root' && $root_password ) {
                 $item->{'Password'} = $root_password;
             }
-            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 );
@@ -811,7 +811,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 );
@@ -824,7 +824,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;
@@ -965,7 +965,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 );
@@ -980,7 +980,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
@@ -1048,7 +1048,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 e634802..2eb009a 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 74ba555..b10405a 100755
--- a/lib/RT/Interface/Email.pm
+++ b/lib/RT/Interface/Email.pm
@@ -954,7 +954,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 6bb78c6..56c0fe9 100755
--- a/lib/RT/Interface/Email/Auth/MailFrom.pm
+++ b/lib/RT/Interface/Email/Auth/MailFrom.pm
@@ -68,7 +68,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 4e11776..7a76799 100755
--- a/lib/RT/Interface/Web.pm
+++ b/lib/RT/Interface/Web.pm
@@ -886,9 +886,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');
     }
@@ -899,12 +899,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/Links_Overlay.pm b/lib/RT/Links_Overlay.pm
index c569609..b04a830 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/Queue_Overlay.pm b/lib/RT/Queue_Overlay.pm
index ee7997f..61b3bc8 100755
--- a/lib/RT/Queue_Overlay.pm
+++ b/lib/RT/Queue_Overlay.pm
@@ -452,7 +452,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 5f0b72e..0fffe4c 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' ) ) {
@@ -1221,7 +1221,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,
@@ -1404,7 +1404,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'} );
 
 
@@ -1476,7 +1476,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),
@@ -1740,7 +1740,7 @@ sub _AddCustomFieldValue {
         # For datetime, we need to display them in "human" format in result message
         #XXX TODO how about date without time?
         if ($cf->Type eq 'DateTime') {
-            my $DateObj = new RT::Date( $self->CurrentUser );
+            my $DateObj = RT::Date->new( $self->CurrentUser );
             $DateObj->Set(
                 Format => 'ISO',
                 Value  => $new_content,
@@ -1847,7 +1847,7 @@ sub DeleteCustomFieldValue {
     my $old_value = $TransactionObj->OldValue;
     # For datetime, we need to display them in "human" format in result message
     if ( $cf->Type eq 'DateTime' ) {
-        my $DateObj = new RT::Date( $self->CurrentUser );
+        my $DateObj = RT::Date->new( $self->CurrentUser );
         $DateObj->Set(
             Format => 'ISO',
             Value  => $old_value,
diff --git a/lib/RT/Shredder/POD.pm b/lib/RT/Shredder/POD.pm
index 5395c54..7e8e513 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 );
 }
diff --git a/lib/RT/Shredder/Plugin.pm b/lib/RT/Shredder/Plugin.pm
index 2567f1b..09f75b8 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/Shredder/Record.pm b/lib/RT/Shredder/Record.pm
index 394d41d..ea9b07c 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 9293929..dd496bd 100755
--- a/lib/RT/Template_Overlay.pm
+++ b/lib/RT/Template_Overlay.pm
@@ -222,7 +222,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 1a16f14..196fed2 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 b9de54e..3ce6f91 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;
 
@@ -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 4b5d855..c863189 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 $ticket = RT::Ticket->new($CurrentUser);
   $ticket->Load($ticket_id);
 
 =head1 DESCRIPTION
@@ -342,7 +342,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'} );
     }
@@ -351,12 +351,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'} );
     }
@@ -374,7 +374,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'} );
     }
@@ -443,7 +443,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 );
     }
 
@@ -868,7 +868,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 );
@@ -903,7 +903,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 );
     }
 
@@ -1856,7 +1856,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 ) {
@@ -1897,7 +1897,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;
 }
@@ -1924,7 +1924,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 );
     }
@@ -1938,7 +1938,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();
@@ -1962,7 +1962,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;
 }
@@ -1981,7 +1981,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;
 }
@@ -2000,7 +2000,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;
 }
@@ -2708,7 +2708,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 => '=',
@@ -2778,7 +2778,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
@@ -3220,7 +3220,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 );
@@ -3244,7 +3244,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 6356c22..d40579b 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
 
@@ -1926,7 +1926,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;
     }
@@ -2321,7 +2321,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 2f3ed26..ca9c2dc 100755
--- a/lib/RT/Transaction_Overlay.pm
+++ b/lib/RT/Transaction_Overlay.pm
@@ -853,9 +853,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 );
         }
@@ -871,9 +871,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);
@@ -881,9 +881,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/sbin/rt-setup-database.in b/sbin/rt-setup-database.in
index 44a324c..1740fd0 100755
--- a/sbin/rt-setup-database.in
+++ b/sbin/rt-setup-database.in
@@ -245,7 +245,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();
@@ -258,7 +258,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 282aa3f..79b6a7a 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";
diff --git a/share/html/Admin/Elements/ListGlobalCustomFields b/share/html/Admin/Elements/ListGlobalCustomFields
index f858dbe..e04341b 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 974fc26..abccdd1 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 a8935f4..2b09a4a 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 1c7fa93..1725c61 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 4abb7fc..4650a9a 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 5310321..64f32b4 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 91bdf09..f3300a6 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 e7684bb..c5fe015 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 1a539b5..0bc5d32 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 a1ff737..c9f3e5e 100755
--- a/share/html/Admin/Global/Template.html
+++ b/share/html/Admin/Global/Template.html
@@ -74,7 +74,7 @@
 
 <%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 15d6311..7736595 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 bc68856..6e04587 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 $title = loc("Modify the group [_1]", $Group->Name);
diff --git a/share/html/Admin/Queues/CustomField.html b/share/html/Admin/Queues/CustomField.html
index 3afab2f..3227f5d 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 a2c51eb..634466c 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 8495925..d9a2688 100755
--- a/share/html/Admin/Queues/People.html
+++ b/share/html/Admin/Queues/People.html
@@ -138,7 +138,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));
 # }}}
 
@@ -176,7 +176,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'});
@@ -186,7 +186,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 fa5956d..5079714 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 529d48f..fb69a9a 100755
--- a/share/html/Admin/Queues/Template.html
+++ b/share/html/Admin/Queues/Template.html
@@ -75,7 +75,7 @@
 
 <%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 066a00e..ff6f53d 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 446c980..e313d97 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 88921be..e525421 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 59861ea..42f2276 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 4eb5470..9cb7528 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 a8a30d5..3b7f4b9 100644
--- a/share/html/Admin/Tools/Shredder/index.html
+++ b/share/html/Admin/Tools/Shredder/index.html
@@ -96,7 +96,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;
@@ -128,8 +128,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;
@@ -172,7 +172,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 ecdf1e0..cea107a 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 c633115..3412218 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 071425f..6df2b27 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 875995e..342cf4a 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/EditCustomFieldDate b/share/html/Elements/EditCustomFieldDate
index b6e10a0..9d87007 100644
--- a/share/html/Elements/EditCustomFieldDate
+++ b/share/html/Elements/EditCustomFieldDate
@@ -49,7 +49,7 @@
 <& /Elements/SelectDate, Name => "$name", current => 0, ShowTime => 0 &> (<%$DateObj->AsString(Time => 0)%>)
 
 <%INIT>
-my $DateObj = new RT::Date ( $session{'CurrentUser'} );
+my $DateObj = RT::Date->new ( $session{'CurrentUser'} );
 $DateObj->Set( Format => 'unknown', Value => $Default );
 </%INIT>
 <%ARGS>
diff --git a/share/html/Elements/EditCustomFieldDateTime b/share/html/Elements/EditCustomFieldDateTime
index 9df469f..84c7299 100644
--- a/share/html/Elements/EditCustomFieldDateTime
+++ b/share/html/Elements/EditCustomFieldDateTime
@@ -49,7 +49,7 @@
 <& /Elements/SelectDate, Name => "$name", current => 0 &> (<%$DateObj->AsString%>)
 
 <%INIT>
-my $DateObj = new RT::Date ( $session{'CurrentUser'} );
+my $DateObj = RT::Date->new ( $session{'CurrentUser'} );
 $DateObj->Set( Format => 'ISO', Value => $Default );
 </%INIT>
 <%ARGS>
diff --git a/share/html/Elements/SelectQueue b/share/html/Elements/SelectQueue
index 2af3428..8404d54 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%>" />
 % }
@@ -89,7 +89,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/SelectTicketSortBy b/share/html/Elements/SelectTicketSortBy
index 123cd9a..7f4bad3 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/Elements/ShowCustomFieldDate b/share/html/Elements/ShowCustomFieldDate
index 3a80c0a..2bd2ede 100644
--- a/share/html/Elements/ShowCustomFieldDate
+++ b/share/html/Elements/ShowCustomFieldDate
@@ -47,7 +47,7 @@
 %# END BPS TAGGED BLOCK }}}
 <%INIT>
  my $content = $Object->Content;
- my $DateObj = new RT::Date ( $session{'CurrentUser'} );
+ my $DateObj = RT::Date->new ( $session{'CurrentUser'} );
  $DateObj->Set( Format => 'unknown', Value => $content );
  $content = $DateObj->AsString(Time => 0);
 </%INIT>
diff --git a/share/html/Elements/ShowCustomFieldDateTime b/share/html/Elements/ShowCustomFieldDateTime
index 4e8ad67..8aa870d 100644
--- a/share/html/Elements/ShowCustomFieldDateTime
+++ b/share/html/Elements/ShowCustomFieldDateTime
@@ -47,7 +47,7 @@
 %# END BPS TAGGED BLOCK }}}
 <%INIT>
  my $content = $Object->Content;
- my $DateObj = new RT::Date ( $session{'CurrentUser'} );
+ my $DateObj = RT::Date->new ( $session{'CurrentUser'} );
  $DateObj->Set( Format => 'ISO', Value => $content );
  $content = $DateObj->AsString;
 </%INIT>
diff --git a/share/html/Install/Initialize.html b/share/html/Install/Initialize.html
index 3d876c5..5582f96 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 37fbf64..1a50593 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 e428890..55d6e03 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 544ab18..edd2929 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 c99f2f7..e6edcd0 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 59d6376..633578d 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 9e2106a..e91472e 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 6740a5f..a978bf3 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 105b2ac..538f4e1 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 b00988a..c40413d 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 f9d6acf..4a92925 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) {
@@ -71,7 +71,7 @@ if (%$changes) {
 my @data;
 
 push @data, [ id => "queue/" . $queue->Id ];
-my $qcfs = RT::CustomFields->new($session{CurrentUser});
+my $qcfs = RT::CustomFields->new($session{CurrentUser});;
 $qcfs->LimitToGlobalOrQueue($id);
 while ( my $qcf = $qcfs->Next() ) {
     if ( $format eq "l" ) {
diff --git a/share/html/REST/1.0/Forms/ticket/attachments b/share/html/REST/1.0/Forms/ticket/attachments
index e7403a5..81b6d2f 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 cdbfcf0..15ce02b 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 4ceb463..1fd0d2a 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 76a85a6..9447c8e 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 afaff7d..fc10217 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 2843f03..e7fbf49 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 e05a631..9215924 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 b893a05..1ea2e62 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 4193990..758958e 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 6303c94..f9e85e9 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 cb88dc1..3b4c6a7 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 f93bdda..6619f12 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 a97fdec..8449ddc 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 64ab611..9b8af2b 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 dbafeba..6c32821 100644
--- a/share/html/Search/Elements/DisplayOptions
+++ b/share/html/Search/Elements/DisplayOptions
@@ -103,7 +103,7 @@ selected="selected"
 </&>
 
 <%INIT>
-my $tickets = new RT::Tickets($session{'CurrentUser'});
+my $tickets = RT::Tickets->new($session{'CurrentUser'});
 my %FieldDescriptions = %{$tickets->FIELDS};
 my %fields;
 
diff --git a/share/html/Search/Elements/SelectGroup b/share/html/Search/Elements/SelectGroup
index a1d2416..47d9b4b 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 1d4295c..7f88520 100644
--- a/share/html/Search/Simple.html
+++ b/share/html/Search/Simple.html
@@ -82,7 +82,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 c796109..93a837f 100755
--- a/share/html/SelfService/Display.html
+++ b/share/html/SelfService/Display.html
@@ -99,7 +99,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?
@@ -120,7 +120,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 7df1ae8..1d42ba6 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 6c4d191..b85b09b 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 8537714..4a78aed 100755
--- a/share/html/Ticket/Create.html
+++ b/share/html/Ticket/Create.html
@@ -356,7 +356,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 5fe019d..b7f2eda 100755
--- a/share/html/Ticket/Display.html
+++ b/share/html/Ticket/Display.html
@@ -110,7 +110,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 06ad3d0..5686b91 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 7b046ea..29fbbeb 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 ae9b631..eb10e65 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 4765b7c..60eb0a5 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/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/charsets-outgoing.t b/t/mail/charsets-outgoing.t
index e8f78cc..646c42a 100644
--- a/t/mail/charsets-outgoing.t
+++ b/t/mail/charsets-outgoing.t
@@ -324,7 +324,7 @@ foreach my $set ( 'ru', 'latin1' ) {
 sub parse_mail {
     my $mail = shift;
     require RT::EmailParser;
-    my $parser = new RT::EmailParser;
+    my $parser = RT::EmailParser->new;
     $parser->ParseMIMEEntityFromScalar( $mail );
     return $parser->Entity;
 }
diff --git a/t/mail/extractsubjecttag.t b/t/mail/extractsubjecttag.t
index 5a25488..852cb7f 100644
--- a/t/mail/extractsubjecttag.t
+++ b/t/mail/extractsubjecttag.t
@@ -92,7 +92,7 @@ EOF
 sub parse_mail {
     my $mail = shift;
     require RT::EmailParser;
-    my $parser = new RT::EmailParser;
+    my $parser = RT::EmailParser->new;
     $parser->ParseMIMEEntityFromScalar( $mail );
     return $parser->Entity;
 }
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 2ee8f2f..57ab0af 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');
@@ -35,7 +35,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);
@@ -77,7 +77,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);
@@ -121,7 +121,7 @@ cmp_deeply( dump_current_and_savepoint('clean'), "current DB equal to savepoint"
     ok( $cid2, "created new ticket" );
     $child2->SetStatus('resolved');
 
-    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' },

commit 517b964ded8a3359ea0a95ea644d961fb8f212e2
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Tue Aug 17 15:24:12 2010 -0400

    fix all other non-mason uses of indirect object syntax spotted by
    perlcritic

diff --git a/lib/RT/Attachment_Overlay.pm b/lib/RT/Attachment_Overlay.pm
index 1f28553..d1a14bd 100644
--- a/lib/RT/Attachment_Overlay.pm
+++ b/lib/RT/Attachment_Overlay.pm
@@ -385,7 +385,7 @@ sub Quote {
 
 	if ($max>76) {
 	    require Text::Wrapper;
-	    my $wrapper=new Text::Wrapper
+	    my $wrapper = Text::Wrapper->new
 		(
 		 columns => 70, 
 		 body_start => ($max > 70*3 ? '   ' : ''),
@@ -420,7 +420,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/Crypt/GnuPG.pm b/lib/RT/Crypt/GnuPG.pm
index 0375e84..d6dea42 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 = RT::EmailParser->new;
+    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/Date.pm b/lib/RT/Date.pm
index 2684e8f..86487eb 100755
--- a/lib/RT/Date.pm
+++ b/lib/RT/Date.pm
@@ -68,13 +68,15 @@ The fact that it assumes that a time of 0 means "never" is probably a bug.
 
 package RT::Date;
 
-use Time::Local;
-use POSIX qw(tzset);
 
 use strict;
 use warnings;
 use base qw/RT::Base/;
 
+use DateTime;
+
+use Time::Local;
+use POSIX qw(tzset);
 use vars qw($MINUTE $HOUR $DAY $WEEK $MONTH $YEAR);
 
 $MINUTE = 60;
@@ -683,7 +685,7 @@ sub LocalizedDateTime
 
     # FIXME : another way to call this module without conflict with local
     # DateTime method?
-    my $dt = new DateTime::( locale => $lang,
+    my $dt = DateTime::->new( locale => $lang,
                             time_zone => $tz,
                             year => $year,
                             month => $mon,
diff --git a/lib/RT/EmailParser.pm b/lib/RT/EmailParser.pm
index eac7b55..6e33c10 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 7c7d44f..4774ae2 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 86e4e12..ffdaec5 100755
--- a/lib/RT/Handle.pm
+++ b/lib/RT/Handle.pm
@@ -583,13 +583,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',
diff --git a/lib/RT/Scrips_Overlay.pm b/lib/RT/Scrips_Overlay.pm
index 768f4af..f4a65db 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 7e8e513..9cd288f 100644
--- a/lib/RT/Shredder/POD.pm
+++ b/lib/RT/Shredder/POD.pm
@@ -51,6 +51,7 @@ package RT::Shredder::POD;
 use strict;
 use warnings;
 use Pod::Select;
+use Pod::PlainText;
 
 sub plugin_html
 {
@@ -63,9 +64,8 @@ sub plugin_html
 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 );
@@ -74,9 +74,8 @@ sub plugin_cli
 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/Test.pm b/lib/RT/Test.pm
index 3ce6f91..4c2a42d 100644
--- a/lib/RT/Test.pm
+++ b/lib/RT/Test.pm
@@ -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 {
diff --git a/lib/RT/Transaction_Overlay.pm b/lib/RT/Transaction_Overlay.pm
index ca9c2dc..a838579 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  => ''
diff --git a/lib/RT/Users_Overlay.pm b/lib/RT/Users_Overlay.pm
index a7f3c8c..decfe4b 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;

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


More information about the Rt-commit mailing list