[Bps-public-commit] r10207 - in RT-Client-Console: trunk/bin trunk/lib/RT/Client trunk/lib/RT/Client/Console trunk/lib/RT/Client/Console/Session trunk/lib/RT/Client/Console/Session/Ticket

dams at bestpractical.com dams at bestpractical.com
Sun Dec 30 14:03:52 EST 2007


Author: dams
Date: Sun Dec 30 14:03:52 2007
New Revision: 10207

Modified:
   RT-Client-Console/   (props changed)
   RT-Client-Console/trunk/bin/rtconsole
   RT-Client-Console/trunk/lib/RT/Client/Console.pm
   RT-Client-Console/trunk/lib/RT/Client/Console/Cnx.pm
   RT-Client-Console/trunk/lib/RT/Client/Console/Session.pm
   RT-Client-Console/trunk/lib/RT/Client/Console/Session/KeyHandler.pm
   RT-Client-Console/trunk/lib/RT/Client/Console/Session/Root.pm
   RT-Client-Console/trunk/lib/RT/Client/Console/Session/Status.pm
   RT-Client-Console/trunk/lib/RT/Client/Console/Session/TabBar.pm
   RT-Client-Console/trunk/lib/RT/Client/Console/Session/Ticket.pm
   RT-Client-Console/trunk/lib/RT/Client/Console/Session/Ticket/Attachments.pm
   RT-Client-Console/trunk/lib/RT/Client/Console/Session/Ticket/CustFields.pm
   RT-Client-Console/trunk/lib/RT/Client/Console/Session/Ticket/Header.pm
   RT-Client-Console/trunk/lib/RT/Client/Console/Session/Ticket/Links.pm
   RT-Client-Console/trunk/lib/RT/Client/Console/Session/Ticket/Transactions.pm

Log:
 r49 at pundit:  dams | 2007-12-30 18:52:14 +0000
 group use together


Modified: RT-Client-Console/trunk/bin/rtconsole
==============================================================================
--- RT-Client-Console/trunk/bin/rtconsole	(original)
+++ RT-Client-Console/trunk/bin/rtconsole	Sun Dec 30 14:03:52 2007
@@ -3,10 +3,13 @@
 use strict;
 use warnings;
 
+use Config::Tiny;
+use Curses;
+use Error qw(:try);
 use Getopt::Long;
 use Pod::Usage;
+use RT::Client::Console;
 
-use Config::Tiny;
 
 my %options;
 GetOptions(\%options,
@@ -63,7 +66,6 @@
 }
 
 
-use Curses;
 my $curses_handler = new Curses;
 noecho();
 nodelay(1);
@@ -76,9 +78,6 @@
 
 $curses_handler->erase();
 
-use RT::Client::Console;
-use Error qw(:try);
-
 try {
 	RT::Client::Console->run(curses_handler => $curses_handler,
 							 rt_servername => $config->{connection}{server},
@@ -87,7 +86,6 @@
 							);
 	endwin;
 } otherwise {
-	use Curses;
 	endwin;
 	print STDERR "\n\n ---- Main Error Message :\n$@\n";
 };

Modified: RT-Client-Console/trunk/lib/RT/Client/Console.pm
==============================================================================
--- RT-Client-Console/trunk/lib/RT/Client/Console.pm	(original)
+++ RT-Client-Console/trunk/lib/RT/Client/Console.pm	Sun Dec 30 14:03:52 2007
@@ -4,12 +4,19 @@
 use warnings;
 
 use Carp;
-our $VERSION = '0.0.4';
-
 use Curses;
 use Curses::Forms::Dialog;
 use Curses::Forms::Dialog::Input;
+use Curses::Widgets::ListBox;
+use List::Util qw(min max);
 use Params::Validate qw(:all);
+use RT::Client::Console::Session::Root;
+use RT::Client::Console::Session::KeyHandler;
+use RT::Client::Console::Cnx;
+use RT::Client::Console::Session;
+
+our $VERSION = '0.0.4';
+
 
 # global Curses handler
 my $curses_handler;
@@ -28,20 +35,16 @@
                          );
 
     $curses_handler = delete $params{curses_handler};
-
-    use RT::Client::Console::Session::Root;
+    
     RT::Client::Console::Session::Root->create();
 
-    use RT::Client::Console::Session::KeyHandler;
     RT::Client::Console::Session::KeyHandler->create();
 
     if ( exists $params{rt_servername}) {
-        use RT::Client::Console::Cnx;
         RT::Client::Console::Cnx->connect(%params);
     }
 
     # starts POE runtime
-    use RT::Client::Console::Session;
     RT::Client::Console::Session->run();
     
 }
@@ -154,7 +157,6 @@
 }
 
 # display a list box
-use Curses::Widgets::ListBox;
 sub input_list {
     my $class = shift;
     my %params = validate( @_, { items => { type => ARRAYREF }, # list items, array of (values or (hashrefs of text => value))
@@ -179,7 +181,6 @@
     my ($screen_w, $screen_h);
     $curses_handler->getmaxyx($screen_h, $screen_w);
 
-    use List::Util qw(min max);
     my $height = min(@display_items + 2, $screen_h - 20);
     my $width = min( max( map { length } (@display_items, $title) ) + 2, $screen_w - 20 );
 
@@ -217,7 +218,6 @@
     my %label_widgets;
     foreach my $group (@header_labels) {
         my $y = 0;
-        use List::Util qw(max);
         my $key_width = max( map { length } map { $_->[0] } @$group );
         $x + $key_width > $max_columns
           and $key_width = $max_columns - $x;

Modified: RT-Client-Console/trunk/lib/RT/Client/Console/Cnx.pm
==============================================================================
--- RT-Client-Console/trunk/lib/RT/Client/Console/Cnx.pm	(original)
+++ RT-Client-Console/trunk/lib/RT/Client/Console/Cnx.pm	Sun Dec 30 14:03:52 2007
@@ -2,13 +2,14 @@
 
 use base qw(RT::Client::Console);
 
-use Params::Validate qw(:all);
-use RT::Client::REST;
-use Error qw(:try);
 use Curses::Forms::Dialog::Logon;
 use Curses::Forms::Dialog::Input;
+use Error qw(:try);
+use Params::Validate qw(:all);
+use RT::Client::REST;
 use RT::Client::Console::Session::Ticket;
 
+
 # global connection data
 my %cnx_data = (
                 handler => undef,    # RT handler

Modified: RT-Client-Console/trunk/lib/RT/Client/Console/Session.pm
==============================================================================
--- RT-Client-Console/trunk/lib/RT/Client/Console/Session.pm	(original)
+++ RT-Client-Console/trunk/lib/RT/Client/Console/Session.pm	Sun Dec 30 14:03:52 2007
@@ -9,6 +9,7 @@
 use List::Util qw(max);
 use Curses::Widgets::Label;
 
+
 # global vars
 
 my %sessions;

Modified: RT-Client-Console/trunk/lib/RT/Client/Console/Session/KeyHandler.pm
==============================================================================
--- RT-Client-Console/trunk/lib/RT/Client/Console/Session/KeyHandler.pm	(original)
+++ RT-Client-Console/trunk/lib/RT/Client/Console/Session/KeyHandler.pm	Sun Dec 30 14:03:52 2007
@@ -2,11 +2,10 @@
 
 use base qw(RT::Client::Console::Session);
 
+use Curses;
 use Params::Validate qw(:all);
-
 use POE;
 
-use Curses;
 
 # class method
 
@@ -136,9 +135,8 @@
 #);
 
 use Curses;
-
-use POSIX qw(:fcntl_h);
 use POE qw( Wheel );
+use POSIX qw(:fcntl_h);
 
 
 sub SELF_STATE_READ  () { 0 }

Modified: RT-Client-Console/trunk/lib/RT/Client/Console/Session/Root.pm
==============================================================================
--- RT-Client-Console/trunk/lib/RT/Client/Console/Session/Root.pm	(original)
+++ RT-Client-Console/trunk/lib/RT/Client/Console/Session/Root.pm	Sun Dec 30 14:03:52 2007
@@ -3,13 +3,13 @@
 use base qw(RT::Client::Console::Session);
 
 use Params::Validate qw(:all);
-use RT::Client::Console::Session::Ticket;
-
 use POE;
 use RT::Client::Console::Cnx;
-use RT::Client::Console::Session::TabBar;
-use RT::Client::Console::Session::Status;
 use RT::Client::Console::Session::Progress;
+use RT::Client::Console::Session::Status;
+use RT::Client::Console::Session::TabBar;
+use RT::Client::Console::Session::Ticket;
+
 
 # class method
 

Modified: RT-Client-Console/trunk/lib/RT/Client/Console/Session/Status.pm
==============================================================================
--- RT-Client-Console/trunk/lib/RT/Client/Console/Session/Status.pm	(original)
+++ RT-Client-Console/trunk/lib/RT/Client/Console/Session/Status.pm	Sun Dec 30 14:03:52 2007
@@ -2,10 +2,9 @@
 
 use base qw(RT::Client::Console::Session);
 
+use Curses::Widgets::Label;
 use Params::Validate qw(:all);
-
 use POE;
-use Curses::Widgets::Label;
 
 
 # class method

Modified: RT-Client-Console/trunk/lib/RT/Client/Console/Session/TabBar.pm
==============================================================================
--- RT-Client-Console/trunk/lib/RT/Client/Console/Session/TabBar.pm	(original)
+++ RT-Client-Console/trunk/lib/RT/Client/Console/Session/TabBar.pm	Sun Dec 30 14:03:52 2007
@@ -5,10 +5,11 @@
 
 use base qw(RT::Client::Console::Session);
 
-use POE;
+use Curses::Forms;
 use Curses::Widgets::Label;
+use POE;
 use RT::Client::Console::Session::Ticket;
-use Curses::Forms;
+
 
 # class method
 

Modified: RT-Client-Console/trunk/lib/RT/Client/Console/Session/Ticket.pm
==============================================================================
--- RT-Client-Console/trunk/lib/RT/Client/Console/Session/Ticket.pm	(original)
+++ RT-Client-Console/trunk/lib/RT/Client/Console/Session/Ticket.pm	Sun Dec 30 14:03:52 2007
@@ -4,12 +4,10 @@
 use base qw(RT::Client::Console::Session
             RT::Client::REST::Ticket);
 
+use Error qw(:try);
+use POE;
 use Params::Validate qw(:all);
-
 use RT::Client::REST;
-
-use POE;
-use Error qw(:try);
 use RT::Client::REST::Ticket;
 use RT::Client::Console::Cnx;
 use RT::Client::Console::Session::Ticket::Header;

Modified: RT-Client-Console/trunk/lib/RT/Client/Console/Session/Ticket/Attachments.pm
==============================================================================
--- RT-Client-Console/trunk/lib/RT/Client/Console/Session/Ticket/Attachments.pm	(original)
+++ RT-Client-Console/trunk/lib/RT/Client/Console/Session/Ticket/Attachments.pm	Sun Dec 30 14:03:52 2007
@@ -5,19 +5,19 @@
 
 use base qw(RT::Client::Console::Session);
 
-use Params::Validate qw(:all);
-use Error qw(:try);
-
-use POE;
-use Memoize;
 use Curses::Widgets; # for textwrap
 use Curses::Widgets::ListBox;
 use Curses::Widgets::TextMemo;
+use Error qw(:try);
+use Params::Validate qw(:all);
+use POE;
+use Memoize;
 use RT::Client::REST::User;
 use RT::Client::Console::Cnx;
 use RT::Client::Console::Session::Progress;
 use RT::Client::Console::Session::Ticket;
 
+
 # class method
 
 

Modified: RT-Client-Console/trunk/lib/RT/Client/Console/Session/Ticket/CustFields.pm
==============================================================================
--- RT-Client-Console/trunk/lib/RT/Client/Console/Session/Ticket/CustFields.pm	(original)
+++ RT-Client-Console/trunk/lib/RT/Client/Console/Session/Ticket/CustFields.pm	Sun Dec 30 14:03:52 2007
@@ -2,13 +2,13 @@
 
 use base qw(RT::Client::Console::Session);
 
+use Curses::Forms;
 use Params::Validate qw(:all);
-
 use POE;
 use POSIX qw(floor);
-use Curses::Forms;
 use RT::Client::Console::Session::Ticket;
 
+
 # class method
 
 # custfields session creation

Modified: RT-Client-Console/trunk/lib/RT/Client/Console/Session/Ticket/Header.pm
==============================================================================
--- RT-Client-Console/trunk/lib/RT/Client/Console/Session/Ticket/Header.pm	(original)
+++ RT-Client-Console/trunk/lib/RT/Client/Console/Session/Ticket/Header.pm	Sun Dec 30 14:03:52 2007
@@ -2,12 +2,12 @@
 
 use base qw(RT::Client::Console::Session);
 
+use Curses::Forms;
 use Params::Validate qw(:all);
-
 use POE;
 use RT::Client::Console::Session::Ticket;
 use RT::Client::Console::Session::Ticket;
-use Curses::Forms;
+
 
 # class method
 

Modified: RT-Client-Console/trunk/lib/RT/Client/Console/Session/Ticket/Links.pm
==============================================================================
--- RT-Client-Console/trunk/lib/RT/Client/Console/Session/Ticket/Links.pm	(original)
+++ RT-Client-Console/trunk/lib/RT/Client/Console/Session/Ticket/Links.pm	Sun Dec 30 14:03:52 2007
@@ -2,13 +2,12 @@
 
 use base qw(RT::Client::Console::Session);
 
+use Curses::Forms;
 use Params::Validate qw(:all);
-use RT::Client::Console::Session::Ticket;
-
 use POE;
-use Curses::Forms;
 use RT::Client::Console::Cnx;
 use RT::Client::Console::Session::Progress;
+use RT::Client::Console::Session::Ticket;
 
 # class method
 

Modified: RT-Client-Console/trunk/lib/RT/Client/Console/Session/Ticket/Transactions.pm
==============================================================================
--- RT-Client-Console/trunk/lib/RT/Client/Console/Session/Ticket/Transactions.pm	(original)
+++ RT-Client-Console/trunk/lib/RT/Client/Console/Session/Ticket/Transactions.pm	Sun Dec 30 14:03:52 2007
@@ -6,15 +6,15 @@
 use base qw(RT::Client::Console::Session);
 
 use Error qw(:try);
-
-use POE;
 use Curses::Widgets; # for textwrap
 use Curses::Widgets::ListBox;
 use Curses::Widgets::TextMemo;
+use POE;
 use RT::Client::Console::Cnx;
 use RT::Client::Console::Session::Progress;
 use RT::Client::Console::Session::Ticket;
 
+
 # class method
 
 # transactions session creation



More information about the Bps-public-commit mailing list