Skip Menu |

This queue is for tickets about the P CPAN distribution.

Report information
The Basics
Id: 89057
Status: resolved
Priority: 0/
Queue: P

People
Owner: pause [...] tlinx.org
Requestors: l.mai [...] web.de
Cc:
AdminCc:

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



Subject: bizarre output for glob references
use P; P "%s", [1, \*DATA, 2]; Output: [1, <*=# line ' .__LINE__ . ' "' ' __FILE__ . "\"\n" . ' Show quoted text
>, 2]
What the heck is this?
From: perl-diddler [...] tlinx.org
On Mon Sep 30 08:29:12 2013, l.mai@web.de wrote: Show quoted text
> use P; > P "%s", [1, \*DATA, 2]; > > Output: > [1, <*=# line ' .__LINE__ . ' "' ' __FILE__ . "\"\n" . '
> >, 2]
> > What the heck is this?
----- It did exactly what you asked it to do (for that version of P). It printed the 1st line of the DATA stream in the P file -- which is supposed to be a short demo/self-test. However, the current version won't do that since I don't try to print from file handles or globs, by default, anymore. I decided that wasn't like a helpful/safe thing to do by default (not really needed in debugging). I implemented an OO switch-passing mechanism for some of less standard options -- requiring an OO-style call when "implicit_io" is wanted. Very much appreciate the reports -- otherwise I'd have "no clue". Your execution issues are especially interesting! FWIW, I got behind in sending updates to CPAN, as my local development got ahead of my testing & documentation... (hmmmm...bet you never heard of that happening before)...
In progress version doesn't try to do IO on GLOB or IO handles, by default, and will produce: Current output: perl -MP -we 'use strict; P "%s", [1, \*DATA, 2]; ' Name "main::DATA" used only once: possible typo at -e line 2. [1, <*=* :GLOB(0xe705b0)*>, 2]
Fixed in V1.1.0