Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the YAML CPAN distribution.

Report information
The Basics
Id: 41885
Status: resolved
Priority: 0/
Queue: YAML

People
Owner: Nobody in particular
Requestors: perl [...] evancarroll.com
Cc:
AdminCc:

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



Subject: YAML bug for PIO Scalar handle w/ tests.
YAML warns if any key or value is a PIO Handle to a scalar, because it tries to seek and tell which isn't permitted in this type of PIO handle. Test attached.
Subject: YAML_PIO_HANDLE.t
use strict; use warnings; use Test::More tests => 4; use YAML; BEGIN{ our $warn = ''; $SIG{__WARN__} = sub { $warn .= $_[0] }; } eval { my $file = ''; open ( my $fh, '>', $file ); my $pio_handle_hash = { $fh => 'fh' }; YAML::Dump $pio_handle_hash; }; unlike ( $main::warn, qr/closed filehandle/, 'YAML HashRef value is PIO handle compatable' ); $main::warn = ''; eval { my $file = ''; open ( my $fh, '>', $file ); my $pio_handle_hash = { fh => $fh }; YAML::Dump $pio_handle_hash; }; unlike ( $main::warn, qr/closed filehandle/, 'YAML HashRef key is PIO handle compatable' ); $main::warn = ''; eval { my $file = ''; open ( my $fh, '>', $file ); my $pio_handle_arr = [ $fh ] ; YAML::Dump $pio_handle_arr; }; unlike ( $main::warn, qr/closed filehandle/, 'YAML ArrayRef is PIO handle compatable' ); $main::warn = ''; eval { my $file = ''; open ( my $fh, '>', $file ); my $pio_handle_scalar = $fh ; YAML::Dump $pio_handle_scalar; }; unlike ( $main::warn, qr/closed filehandle/, 'YAML Scalar is PIO handle compatable' ); $main::warn = '';
This issue has been copied to: https://github.com/ingydotnet/yaml-pm/issues/93 please take all future correspondence there. This ticket will remain open but please do not reply here. This ticket will be closed when the github issue is dealt with.
This seems fixed, don't know in which version, though.