AnyEvent-App-PerlLive
view release on metacpan or search on metacpan
lib/AnyEvent/App/PerlLive.pm view on Meta::CPAN
package AnyEvent::App::PerlLive;
use utf8;
use strict;
use warnings;
use FindBin;
use File::Spec;
our $VERSION = '0.01';
sub script_path {
my $class = shift;
my $script = File::Spec->catfile($FindBin::Bin, 'perl-live.pl');
return $script if -f $script;
require IPC::Cmd;
return IPC::Cmd::can_run('perl-live.pl') // 'perl-live.pl';
}
1;
__END__
=pod
=encoding utf-8
=head1 NAME
AnyEvent::App::PerlLive - Persistent Perl live-coding interpreter and REPL backend
=head1 SYNOPSIS
From the command line:
perl-live.pl -g
In standalone or framed input mode:
echo 'my $x = 41; say ++$x;' | perl-live.pl -g
From Emacs (with C<perl-live.el>):
(require 'perl-live)
(add-hook 'cperl-mode-hook #'perl-live-mode)
(add-hook 'perl-mode-hook #'perl-live-mode)
=head1 DESCRIPTION
C<AnyEvent::App::PerlLive> provides a persistent, event-driven Perl evaluation environment.
Top-level lexical declarations (C<my>) become package variables, lexical pragmas
and compiler hints persist across evaluations, and errors maintain accurate source
filenames and line numbers.
Driven by L<AnyEvent>, it integrates seamlessly with asynchronous backends such
as L<EV> and L<EV::WebKit>.
=head1 SCRIPTS
=over 4
=item L<perl-live.pl>
The core evaluation server. Supports raw EOF input, length-prefixed UTF-8 streams
( run in 0.703 second using v1.01-cache-2.11-cpan-234fa220139 )