summaryrefslogtreecommitdiffstats
path: root/lib/Reply/Plugin/Nopaste.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Reply/Plugin/Nopaste.pm')
-rw-r--r--lib/Reply/Plugin/Nopaste.pm44
1 files changed, 22 insertions, 22 deletions
diff --git a/lib/Reply/Plugin/Nopaste.pm b/lib/Reply/Plugin/Nopaste.pm
index 8ecf0e1..85106eb 100644
--- a/lib/Reply/Plugin/Nopaste.pm
+++ b/lib/Reply/Plugin/Nopaste.pm
@@ -28,43 +28,43 @@ like [DataDump], etc).
=cut
class Reply::Plugin::Nopaste extends Reply::Plugin {
- has $history = '';
- has $service;
+ has $!history = '';
+ has $!service;
- has $prompt;
- has $line;
- has $result;
+ has $!prompt;
+ has $!line;
+ has $!result;
method prompt ($next, @args) {
- $prompt = $next->(@args);
- return $prompt;
+ $!prompt = $next->(@args);
+ return $!prompt;
}
method read_line ($next, @args) {
- $line = $next->(@args);
- $line = "$line\n" if defined $line;
- return $line;
+ $!line = $next->(@args);
+ $!line = "$!line\n" if defined $!line;
+ return $!line;
}
method print_error ($next, $error) {
- $result = $error;
+ $!result = $error;
$next->($error);
}
method print_result ($next, @result) {
- $result = @result ? join('', @result) . "\n" : '';
+ $!result = @result ? join('', @result) . "\n" : '';
$next->(@result);
}
method loop ($continue) {
- $history .= "$prompt$line$result"
- if defined $prompt
- && defined $line
- && defined $result;
+ $!history .= "$!prompt$!line$!result"
+ if defined $!prompt
+ && defined $!line
+ && defined $!result;
- undef $prompt;
- undef $line;
- undef $result;
+ undef $!prompt;
+ undef $!line;
+ undef $!result;
$continue;
}
@@ -73,11 +73,11 @@ class Reply::Plugin::Nopaste extends Reply::Plugin {
$cmd_line = "Reply session" unless length $cmd_line;
print App::Nopaste->nopaste(
- text => $history,
+ text => $!history,
desc => $cmd_line,
lang => 'perl',
- (defined $service
- ? (services => [ $service ])
+ (defined $!service
+ ? (services => [ $!service ])
: ()),
) . "\n";