[Rt-commit] rt branch, 3.8/perlcritic, updated. rt-3.8.10-42-gce47bd0
Thomas Sibley
trs at bestpractical.com
Fri Jul 1 12:24:19 EDT 2011
The branch, 3.8/perlcritic has been updated
via ce47bd01fe0757cd122caa0916b02f2a94e88d10 (commit)
via c2959080854420f2d0ae846751a8eee54a43398d (commit)
from ad60f472a2a83b330b9b9c2afb029df55c89220a (commit)
Summary of changes:
bin/rt.in | 5 +-
lib/RT/Interface/Web/Menu.pm | 70 -----------------------------
lib/RT/Interface/Web/Menu/Item.pm | 88 -------------------------------------
sbin/rt-email-group-admin.in | 8 ++--
4 files changed, 7 insertions(+), 164 deletions(-)
delete mode 100644 lib/RT/Interface/Web/Menu.pm
delete mode 100644 lib/RT/Interface/Web/Menu/Item.pm
- Log -----------------------------------------------------------------
commit c2959080854420f2d0ae846751a8eee54a43398d
Author: Thomas Sibley <trs at bestpractical.com>
Date: Fri Jul 1 11:32:49 2011 -0400
Rename functions so they don't conflict with built-ins
diff --git a/bin/rt.in b/bin/rt.in
index c30266a..292fa48 100755
--- a/bin/rt.in
+++ b/bin/rt.in
@@ -136,7 +136,7 @@ my %handlers = (
edit => ["create", "edit", "new", "ed"],
list => ["search", "list", "ls"],
comment => ["comment", "correspond"],
- link => ["link", "ln"],
+ link_ticket => ["link", "ln"],
merge => ["merge"],
grant => ["grant", "revoke"],
take => ["take", "steal", "untake"],
@@ -870,7 +870,7 @@ sub merge {
# Link one ticket to another.
-sub link {
+sub link_ticket {
my ($bad, $del, %data) = (0, 0, ());
my $type;
@@ -1450,6 +1450,7 @@ sub parse_config_file {
sub whine {
my $sub = (caller(1))[3];
$sub =~ s/^main:://;
+ $sub =~ s/link_ticket/link/;
warn "rt: $sub: @_\n";
return 0;
}
diff --git a/sbin/rt-email-group-admin.in b/sbin/rt-email-group-admin.in
index 125ba3f..f7e0795 100755
--- a/sbin/rt-email-group-admin.in
+++ b/sbin/rt-email-group-admin.in
@@ -161,7 +161,7 @@ sub parse_args {
$opts->{'name'} = $tmp;
}
elsif ( GetOptions( 'rename=s' => \$tmp ) && $tmp ) {
- $cmd = 'rename';
+ $cmd = 'rename_action';
$opts->{'name'} = $tmp;
GetOptions( 'newname=s' => \$opts->{'newname'} );
unless ( $opts->{'newname'} ) {
@@ -170,7 +170,7 @@ sub parse_args {
}
}
elsif ( GetOptions( 'delete=s' => \$tmp ) && $tmp) {
- $cmd = 'delete';
+ $cmd = 'delete_action';
$opts->{'name'} = $tmp;
} else {
$cmd = 'usage';
@@ -370,7 +370,7 @@ Deletes action NAME if scrips doesn't use it.
=cut
-sub delete {
+sub delete_action {
my $action = _get_action_by_name( $opts->{'name'} );
unless ( $action ) {
print STDERR "ScripAction '". $opts->{'name'} ."' doesn't exist\n";
@@ -444,7 +444,7 @@ Renames action NAME to NEWNAME.
=cut
-sub rename {
+sub rename_action {
my $action = _get_action_by_name( $opts->{'name'} );
unless ( $action ) {
print STDERR "ScripAction '". $opts->{'name'} ."' doesn't exist\n";
commit ce47bd01fe0757cd122caa0916b02f2a94e88d10
Author: Thomas Sibley <trs at bestpractical.com>
Date: Fri Jul 1 11:34:11 2011 -0400
Remove crufty, completely unused 2005 vintage menuing redo
It gets better in 4.0.
diff --git a/lib/RT/Interface/Web/Menu.pm b/lib/RT/Interface/Web/Menu.pm
deleted file mode 100644
index 8c1e518..0000000
--- a/lib/RT/Interface/Web/Menu.pm
+++ /dev/null
@@ -1,70 +0,0 @@
-# BEGIN BPS TAGGED BLOCK {{{
-#
-# COPYRIGHT:
-#
-# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC
-# <sales at bestpractical.com>
-#
-# (Except where explicitly superseded by other copyright notices)
-#
-#
-# LICENSE:
-#
-# This work is made available to you under the terms of Version 2 of
-# the GNU General Public License. A copy of that license should have
-# been provided with this software, but in any event can be snarfed
-# from www.gnu.org.
-#
-# This work is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301 or visit their web page on the internet at
-# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html.
-#
-#
-# CONTRIBUTION SUBMISSION POLICY:
-#
-# (The following paragraph is not intended to limit the rights granted
-# to you to modify and distribute this software under the terms of
-# the GNU General Public License and is only of importance to you if
-# you choose to contribute your changes and enhancements to the
-# community by submitting them to Best Practical Solutions, LLC.)
-#
-# By intentionally submitting any modifications, corrections or
-# derivatives to this work, or any other work intended for use with
-# Request Tracker, to Best Practical Solutions, LLC, you confirm that
-# you are the copyright holder for those contributions and you grant
-# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
-# royalty-free, perpetual, license to use, copy, create derivative
-# works based on those contributions, and sublicense and distribute
-# those contributions and any derivatives thereof.
-#
-# END BPS TAGGED BLOCK }}}
-
-package RT::Interface::Web::Menu;
-use strict;
-use warnings;
-
-sub new {
- my $class = shift;
- my $self = bless {}, $class;
- $self->{'root_node'} = RT::Interface::Web::Menu::Item->new();
- return $self;
-}
-
-
-sub as_hash_of_hashes {
-
-}
-
-sub root {
- my $self = shift;
- return $self->{'root_node'};
-}
-
-1;
diff --git a/lib/RT/Interface/Web/Menu/Item.pm b/lib/RT/Interface/Web/Menu/Item.pm
deleted file mode 100644
index 29fb13b..0000000
--- a/lib/RT/Interface/Web/Menu/Item.pm
+++ /dev/null
@@ -1,88 +0,0 @@
-# BEGIN BPS TAGGED BLOCK {{{
-#
-# COPYRIGHT:
-#
-# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC
-# <sales at bestpractical.com>
-#
-# (Except where explicitly superseded by other copyright notices)
-#
-#
-# LICENSE:
-#
-# This work is made available to you under the terms of Version 2 of
-# the GNU General Public License. A copy of that license should have
-# been provided with this software, but in any event can be snarfed
-# from www.gnu.org.
-#
-# This work is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301 or visit their web page on the internet at
-# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html.
-#
-#
-# CONTRIBUTION SUBMISSION POLICY:
-#
-# (The following paragraph is not intended to limit the rights granted
-# to you to modify and distribute this software under the terms of
-# the GNU General Public License and is only of importance to you if
-# you choose to contribute your changes and enhancements to the
-# community by submitting them to Best Practical Solutions, LLC.)
-#
-# By intentionally submitting any modifications, corrections or
-# derivatives to this work, or any other work intended for use with
-# Request Tracker, to Best Practical Solutions, LLC, you confirm that
-# you are the copyright holder for those contributions and you grant
-# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
-# royalty-free, perpetual, license to use, copy, create derivative
-# works based on those contributions, and sublicense and distribute
-# those contributions and any derivatives thereof.
-#
-# END BPS TAGGED BLOCK }}}
-
-package RT::Interface::Web::Menu::Item;
-use strict;
-use warnings;
-
-sub new {
- my $class = shift;
- my $self = bless {},$class;
- $self->{'_attributes'} = {};
- return($self);
-}
-
-sub label { my $self = shift; $self->_accessor( label => @_) } ;
-sub absolute_url { my $self = shift; $self->_accessor( absolute_url => @_) } ;
-sub rt_path { my $self = shift; $self->_accessor( rt_path => @_) } ;
-sub hilight { my $self = shift; $self->_accessor( hilight => @_);
- $self->parent->hilight(1);
- } ;
-sub sort_order { my $self = shift; $self->_accessor( sort_order => @_) } ;
-
-sub add_child {
-}
-
-sub delete {
-}
-
-sub children {
-
-}
-
-sub _accessor {
- my $self = shift;
- my $key = shift;
- if (@_){
- $self->{'attributes'}->{$key} = shift;
-
- }
- return $self->{'_attributes'}->{$key};
-}
-
-1;
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list