Permalink
Browse files

fallout from the MessageSystem upgrade

  • Loading branch information...
1 parent 261d15c commit 037b6506dcb6c976c3d9dba51422b9215c419c4e @jettero committed Jun 24, 2014
View
@@ -6,7 +6,7 @@ use namespace::autoclean;
use Net::DNS;
use Net::IP;
use IPC::System::Simple 'systemx';
-use Term::ReadLine::CLISH::MessageSystem;
+use Term::ReadLine::CLISH::MessageSystem qw(:msgs);
use common::sense;
command(
@@ -17,7 +17,7 @@ use Moose;
use Moose::Util::TypeConstraints;
use namespace::autoclean;
use Term::ReadLine;
-use Term::ReadLine::CLISH::MessageSystem;
+use Term::ReadLine::CLISH::MessageSystem qw(:all);
use Term::ReadLine::CLISH::InputModel;
use File::Spec;
use File::HomeDir;
@@ -204,7 +204,7 @@ sub handle_qmark {
use Data::Dump::Filtered qw(add_dump_filter); use Data::Dump qw(dump);
add_dump_filter(sub{ my ($ctx, $obj) = @_; return { dump => "$obj»" } if $ctx->is_blessed; });
- debug dump({possibilities => $possibilities, bpe=>[$buffer, $point, $end]}) if $ENV{CLISH_DEBUG};
+ wtf "handle_qmark", "\n" . dump({possibilities => $possibilities, bpe=>[$buffer, $point, $end]}) . "\n";
help from_table map { [ $_->name, $_->help ] } @$possibilities;
}
@@ -4,7 +4,7 @@ use Moose;
use Moose::Util::TypeConstraints;
use namespace::sweep; # like autoclean, but doesn't murder overloads
use Carp;
-use Term::ReadLine::CLISH::MessageSystem;
+use Term::ReadLine::CLISH::MessageSystem qw(:msgs);
use common::sense;
use overload '""' => \&stringify, fallback => 1;
@@ -4,7 +4,7 @@ package Term::ReadLine::CLISH::Command::Argument;
use Moose;
use namespace::sweep; # like autoclean, but doesn't murder overloads
use Moose::Util::TypeConstraints;
-use Term::ReadLine::CLISH::MessageSystem;
+use Term::ReadLine::CLISH::MessageSystem qw(:msgs);
use common::sense;
use overload '""' => \&stringify, fallback => 1;
use Carp;
@@ -11,7 +11,7 @@ use Moose;
use common::sense;
use namespace::autoclean;
use Term::ReadLine::CLISH::Parser;
-use Term::ReadLine::CLISH::MessageSystem;
+use Term::ReadLine::CLISH::MessageSystem qw(:msgs);
has qw(parser is rw isa Term::ReadLine::CLISH::Parser);
has qw(prompt is rw isa Str default) => "clish> ";
@@ -1,7 +1,7 @@
package Term::ReadLine::CLISH::Library::Commands::Configure;
use Term::ReadLine::CLISH::Command::Moose;
-use Term::ReadLine::CLISH::MessageSystem;
+use Term::ReadLine::CLISH::MessageSystem qw(:msgs);
use namespace::autoclean;
use common::sense;
@@ -1,7 +1,7 @@
package Term::ReadLine::CLISH::Library::Commands::Configure::Debug;
use Term::ReadLine::CLISH::Command::Moose;
-use Term::ReadLine::CLISH::MessageSystem;
+use Term::ReadLine::CLISH::MessageSystem qw(:msgs);
use namespace::autoclean;
use common::sense;
@@ -48,7 +48,7 @@ the order they are specified in the command definition.
=cut
use Term::ReadLine::CLISH::Command::Moose;
-use Term::ReadLine::CLISH::MessageSystem;
+use Term::ReadLine::CLISH::MessageSystem qw(:msgs);
use IPC::System::Simple qw(systemx);
use namespace::autoclean;
use common::sense;
@@ -12,7 +12,7 @@ use Term::ReadLine::CLISH::Message::Error;
use Text::Table;
use Carp;
-our @MSGS = qw(debug help info warning error todo from_table);
+our @MSGS = qw(wtf debug help info warning error XXX todo from_table);
our @TOOL = qw(scrub_last_error from_table);
our @BOOT = qw(install_generic_message_handlers);
@@ -168,6 +168,7 @@ sub todo($;$) {
Term::ReadLine::CLISH::Message::TODO->new(%args)->spew;
}
+*XXX = \&todo;
sub wtf($;$) {
my ($pkg, $file, $line) = caller;
@@ -4,7 +4,7 @@ package Term::ReadLine::CLISH::Parser;
use Moose;
use namespace::autoclean;
use Moose::Util::TypeConstraints;
-use Term::ReadLine::CLISH::MessageSystem;
+use Term::ReadLine::CLISH::MessageSystem qw(:msgs);
use Parse::RecDescent;
use Module::Pluggable::Object;
use common::sense;
@@ -84,7 +84,7 @@ sub parse_for_tab_completion {
my @args_with_values; # XXX: apply filters here, find applicable args
my @args_without_values;
- wtf("XXX: not really done even forming this idea");
+ XXX "not really done even forming this idea";
} else {
# XXX: we're matching commands in the 0 or the 1 case, so populate like this

0 comments on commit 037b650

Please sign in to comment.