#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
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";
}
# 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";
{
my $self = shift;
my $name = shift or return (0, "Name not specified");
+ $name =~ /^\w+(::\w+)*$/ or return (0, "Invalid plugin name");
local $@;
my $plugin = "RT::Shredder::Plugin::$name";