Bug#884286: use Switch breaks <DATA>

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Bug#884286: use Switch breaks <DATA>

Christoph Berg-7
Package: libswitch-perl
Version: 2.17-2
Severity: normal

Merely adding "use Switch;" to a perl program breaks the use of
__DATA__ sections via <DATA>:

$ cat switch.pl
use Switch;
print <DATA>;
__DATA__
foobar

$ perl switch.pl

$ cat switch.pl
#use Switch;
print <DATA>;
__DATA__
foobar

$ perl switch.pl
foobar

This is not documented under LIMITATIONS in Switch(3pm).

Christoph

Reply | Threaded
Open this post in threaded view
|

Bug#884286: use Switch breaks <DATA>

Damyan Ivanov-5
Control: tag -1 upstream confirmed
Control: forwarded -1 https://rt.cpan.org/Public/Bug/Display.html?id=97440
Control: clone -1 -2
Control: reassign -2 perl/5.20.2-3
Control: retitle -2 filter_read in block mode makes DATA handle empty
Control: tag -2 upstream
Control: forwarded -2 https://rt.cpan.org/Public/Bug/Display.html?id=101033
Control: block -1 by -2

-=| Christoph Berg, 13.12.2017 13:05:58 +0100 |=-
> Package: libswitch-perl
> Version: 2.17-2
> Severity: normal
>
> Merely adding "use Switch;" to a perl program breaks the use of
> __DATA__ sections via <DATA>:

Right.

As noted in https://rt.cpan.org/Public/Bug/Display.html?id=97440 this
is a bug/limitation of Filter::Util::Call (reported as
https://rt.cpan.org/Public/Bug/Display.html?id=101033)


Cheers,
    dam

Reply | Threaded
Open this post in threaded view
|

Bug#884318: filter_read in block mode makes DATA handle empty

Niko Tyni-3
Control: clone -1 -2
Control: reassign -2 libfilter-perl 1.58-1
Control: block -1 with -2

On Wed, Dec 13, 2017 at 08:27:14PM +0000, Damyan Ivanov wrote:
> -=| Christoph Berg, 13.12.2017 13:05:58 +0100 |=-
> > Package: libswitch-perl
> > Version: 2.17-2
> > Severity: normal
> >
> > Merely adding "use Switch;" to a perl program breaks the use of
> > __DATA__ sections via <DATA>:
 
> As noted in https://rt.cpan.org/Public/Bug/Display.html?id=97440 this
> is a bug/limitation of Filter::Util::Call (reported as
> https://rt.cpan.org/Public/Bug/Display.html?id=101033)

As Filter::Util::Call is also in the separate libfilter-perl package,
this needs to be fixed (or maybe just documented as a limitation?) there
first. The fix can then be backported to the Perl core version, or can
trickle there later by the normal upstream process.
--
Niko Tyni   [hidden email]