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

Report information
The Basics
Id:
89597
Status:
new
Priority:
Low/Low
Queue:

People
Owner:
Nobody in particular
Requestors:
clifford.sobchuk [...] ericsson.com
Cc:
AdminCc:

BugTracker
Severity:
(no value)
Broken in:
(no value)
Fixed in:
(no value)



Subject: Persitent Context not cleared
Date: Thu, 17 Oct 2013 23:42:11 +0000
To: "bug-Devel-REPL@rt.cpan.org" <bug-Devel-REPL@rt.cpan.org>
From: Clifford Sobchuk <clifford.sobchuk@ericsson.com>

Hi, I found a bug while using a module that uses Devel::REPL for its command shell and the maintainer indicated that I should forward the issue on to be resolved. A summary would be that I would set a variable using ‘my @x’ and even though it was not set initially, it would have a set of values. I tried this several times and then also with the perl command line which worked as expected. The below email thread explains in more detail as well as the finding from the PDL module maintainer. Devel::REPL version is Devel-REPL-1.003025 via cpan with Strawberry Perl 5.16.3.1 32 bit on Windows 7 Enterprise 64 bit.

 

Let me know if you have further questions.

Thanks, Cliff.

 

Hi Cliff-

It is an edge case where the lexical variable is not

cleared in the persistent context and the problem
is visible in the Devel::REPL shell and not just pdl2.

I'll take a look but definitely worth a bug ticket until
it is resolved.  The behavior may be consistent with
the current implementation---but I think it should

match the perl script/program result when ever possible.

--Chris

 

On Wed, Oct 9, 2013 at 11:48 PM, Clifford Sobchuk <clifford.sobchuk@ericsson.com> wrote:

Hi Folks, I received some unexpected results when using ‘my’ in the pdl2 shell. I verified that the correct behaviour works from perl –e, but I am not sure if this is a pdl2 shell problem or a Term::ReadLine problem.

 

Thanks Cliff.

 

I tried the following code:

pdl> foreach $i (1..5) { my @a; print "my a is @a\n"; @a = (1,2,3);print "now  a  is @a\n";}

 

not expecting to get :

my a is 1 2 3        <<<<<<<<< This should be blank.

now  a is 1 2 3

my a is

now  a is 1 2 3

my a is

now  a is 1 2 3

my a is

now  a is 1 2 3

my a is

now  a is 1 2 3

 

to be sure that it was the values from the last run (as I had done it several times)

pdl> @a=(4,5,6)

 

pdl> foreach $i (1..5) { my @a; print "my a is @a\n"; @a = (1,2,3);print "now  a is @a\n";}

my a is 4 5 6           <<<<<<<<< This should be blank, but is the last assignment to @a.

now  a is 1 2 3

my a is

now  a is 1 2 3

my a is

now  a is 1 2 3

my a is

now  a is 1 2 3

my a is

now  a is 1 2 3

 

I am running Win7 64 bit with Strawberry Perl 5.16.3.1 32 bit with Term::ReadLine and Term::ReadLine::Perl both installed from CPAN this past week.PDL and pdl2 shell are:

C:\Users\eclisob>pdl2

load_rcfile: got $HOME = C:/Users/eclisob

load_rcfile: loading C:/Users/eclisob/.perldlrc

 

******************************************

* Warning: TERM type is dumb!            *

* Limited ReadLine functionality will be *

* available.  Please unset TERM or use a *

* different terminal type.               *

******************************************

 

Perldl2 Shell v0.008

      PDL comes with ABSOLUTELY NO WARRANTY. For details, see the file

      'COPYING' in the PDL distribution. This is free software and you

      are welcome to redistribute it under certain conditions, see

      the same file for details.

Loaded plugins:

  CleanErrors

  Commands

  Completion

  CompletionDriver::LexEnv

  CompletionDriver::Methods

  DDS

  FindVariable

  History

  LexEnv

  MultiLine::PPI

  NiceSlice

  PDLCommands

  Packages

  PrintControl

  ReadLineHistory

Type 'help' for online help

Type Ctrl-D or quit to exit

Loaded PDL v2.006

 

CLIFF SOBCHUK
Engineer IV - Systems Developer
BNET DURA

Ericsson
Home Office
T3K3Y5, Calgary, AB, Canada
Phone +16139636957
Mobile +14038199233
clifford.sobchuk@ericsson.com
www.ericsson.com

Legal entity: Ericsson Canada, registered office in Terry Fox. This Communication is Confidential. We only send and receive email on the basis of the terms set out at www.ericsson.com/email_disclaimer

_______________________________________________
Perldl mailing list
Perldl@jach.hawaii.edu
http://mailman.jach.hawaii.edu/mailman/listinfo/perldl

 

 



This service runs on Request Tracker, is sponsored by The Perl Foundation, and maintained by Best Practical Solutions.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.