summaryrefslogtreecommitdiffstats
path: root/lib/Reply/Plugin/Editor.pm
diff options
context:
space:
mode:
authorStevan Little <stevan.little@iinteractive.com>2013-09-01 13:27:33 -0400
committerJesse Luehrs <doy@tozt.net>2013-09-03 16:50:15 -0400
commit30d7375bba8b179dedf1c2ca322d758e5330752d (patch)
tree62427ef686e6f6576a5035887813050faad2fa31 /lib/Reply/Plugin/Editor.pm
parent5da5169c7fa1a64b9ddc2eae14d9435cc54f107a (diff)
downloadreply-30d7375bba8b179dedf1c2ca322d758e5330752d.tar.gz
reply-30d7375bba8b179dedf1c2ca322d758e5330752d.zip
twigils
Diffstat (limited to 'lib/Reply/Plugin/Editor.pm')
-rw-r--r--lib/Reply/Plugin/Editor.pm14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/Reply/Plugin/Editor.pm b/lib/Reply/Plugin/Editor.pm
index 8f980cd..816e4fd 100644
--- a/lib/Reply/Plugin/Editor.pm
+++ b/lib/Reply/Plugin/Editor.pm
@@ -29,11 +29,11 @@ otherwise it will use the value of C<$ENV{VISUAL}> or C<$ENV{EDITOR}>.
=cut
class Reply::Plugin::Editor extends Reply::Plugin {
- has $editor;
- has $current_text = '';
+ has $!editor;
+ has $!current_text = '';
submethod BUILD ($opts) {
- $editor = Proc::InvokeEditor->new(
+ $!editor = Proc::InvokeEditor->new(
(defined $opts->{editor}
? (editors => [ $opts->{editor} ])
: ())
@@ -53,7 +53,7 @@ class Reply::Plugin::Editor extends Reply::Plugin {
);
}
- my $current_text = do {
+ my $!current_text = do {
local $/;
if (open my $fh, '<', $line) {
<$fh>;
@@ -63,11 +63,11 @@ class Reply::Plugin::Editor extends Reply::Plugin {
return '';
}
};
- $text = $editor->edit($current_text, '.pl');
+ $text = $!editor->edit($!current_text, '.pl');
}
else {
- $text = $editor->edit($current_text, '.pl');
- $current_text = $text;
+ $text = $!editor->edit($!current_text, '.pl');
+ $!current_text = $text;
}
return $text;