Skip Menu |

This queue is for tickets about the Devel-REPL CPAN distribution.

Report information
The Basics
Id: 83127
Status: open
Priority: 0/
Queue: Devel-REPL

Owner: Nobody in particular
Requestors: iam [...]
Cc: iam [...]

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)

CC: "Steve Nolte" <iam [...]>
Subject: Devel::REPL::Plugin::LexEnv - referencing a scalar
Download (untitled) / with headers
text/plain 585b
On Mon, Feb 04, 2013 at 03:18:20PM -0600, Steve Nolte wrote: Show quoted text
> Greetings! > > I would like to create a script that exposes a scalar I already have > instantiated into a REPL shell. > seems really > close, but how do I reference the scalar that already exists without > recreating it in the CODEZ block? > > Thanks, > Steve Nolte
Good question! I am cc-ing your question to the ticket queue so the (real) authors can see it, as I haven't really used Devel::REPL much myself - I've simply released the last few bug fixes :)
Download (untitled) / with headers
text/plain 596b
Sending Steve's reply back to the ticket: Show quoted text
> Hi Karen, > Thanks for creating the ticket. I crawled through some of the > examples in the Lexical::Persistence module and found that this is > possibly doing what I want: > > my $repl = Devel::REPL->new(); > $repl->load_plugin($_) for qw/History DataPrinter LexEnv/; > $repl->lexical_environment->set_context( _ => { '$schema' =>
$self->_schema } Show quoted text
> ); > $repl->run; > > > The underscore notation is a bit confusing... but I'm guessing it's > the convention I need to follow in order to get inject a scalar named > '$schema' into my REPL shell.

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to