summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2013-06-03 12:29:11 -0500
committerJesse Luehrs <doy@tozt.net>2013-06-03 12:29:11 -0500
commit1862980572c4fa54d78a8be080f42634fd26d9d8 (patch)
treea04dfe05348a93a6077ddb0263313c54c60dc8de
parent877a74a681a801fb411d16df182f43ed28e923a0 (diff)
downloadreply-1862980572c4fa54d78a8be080f42634fd26d9d8.tar.gz
reply-1862980572c4fa54d78a8be080f42634fd26d9d8.zip
make a couple things private for now
-rw-r--r--lib/Reply.pm42
1 files changed, 21 insertions, 21 deletions
diff --git a/lib/Reply.pm b/lib/Reply.pm
index 699e808..d32ff05 100644
--- a/lib/Reply.pm
+++ b/lib/Reply.pm
@@ -22,7 +22,7 @@ sub new {
if (defined $opts{config}) {
print "Loading configuration from $opts{config}... ";
- $self->load_config($opts{config});
+ $self->_load_config($opts{config});
print "done\n";
}
@@ -44,7 +44,23 @@ sub load_plugin {
push @{ $self->{plugins} }, $plugin;
}
-sub load_config {
+sub run {
+ my $self = shift;
+
+ while (defined(my $line = $self->_read)) {
+ try {
+ my @result = $self->_eval($line);
+ $self->_print_result(@result);
+ }
+ catch {
+ $self->_print_error($_);
+ };
+ $self->_loop;
+ }
+ print "\n";
+}
+
+sub _load_config {
my $self = shift;
my ($file) = @_;
@@ -75,7 +91,7 @@ sub load_config {
}
}
-sub plugins {
+sub _plugins {
my $self = shift;
return (
@@ -84,22 +100,6 @@ sub plugins {
);
}
-sub run {
- my $self = shift;
-
- while (defined(my $line = $self->_read)) {
- try {
- my @result = $self->_eval($line);
- $self->_print_result(@result);
- }
- catch {
- $self->_print_error($_);
- };
- $self->_loop;
- }
- print "\n";
-}
-
sub _read {
my $self = shift;
@@ -149,7 +149,7 @@ sub _loop {
sub _wrapped_plugin {
my $self = shift;
- my @plugins = ref($_[0]) ? @{ shift() } : $self->plugins;
+ my @plugins = ref($_[0]) ? @{ shift() } : $self->_plugins;
my ($method, @args) = @_;
@plugins = grep { $_->can($method) } @plugins;
@@ -164,7 +164,7 @@ sub _wrapped_plugin {
sub _chained_plugin {
my $self = shift;
- my @plugins = ref($_[0]) ? @{ shift() } : $self->plugins;
+ my @plugins = ref($_[0]) ? @{ shift() } : $self->_plugins;
my ($method, @args) = @_;
@plugins = grep { $_->can($method) } @plugins;