diff options
author | Stevan Little <stevan.little@iinteractive.com> | 2013-09-01 13:27:33 -0400 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2013-09-03 16:50:15 -0400 |
commit | 30d7375bba8b179dedf1c2ca322d758e5330752d (patch) | |
tree | 62427ef686e6f6576a5035887813050faad2fa31 /lib/Reply/Plugin/Editor.pm | |
parent | 5da5169c7fa1a64b9ddc2eae14d9435cc54f107a (diff) | |
download | reply-30d7375bba8b179dedf1c2ca322d758e5330752d.tar.gz reply-30d7375bba8b179dedf1c2ca322d758e5330752d.zip |
twigils
Diffstat (limited to 'lib/Reply/Plugin/Editor.pm')
-rw-r--r-- | lib/Reply/Plugin/Editor.pm | 14 |
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; |