Subject: | YAML cannot freeze FileHandle |
Date: | Tue, 08 Jun 2010 14:22:19 -0500 |
To: | bug-YAML [...] rt.cpan.org |
From: | Matt Zagrabelny <mzagrabe [...] d.umn.edu> |
Greetings,
I am trying to freeze a FileHandle and am getting an error:
Freezing a filehandle created with 'open'.
Freezing an object filehandle created with FileHandle.
YAML Error: Can't create YAML::Node from 'GLOB'
Code: Can't create YAML::Node from 'GLOB'
at /usr/share/perl5/YAML/Types.pm line 35
Here is the code to generate the error:
-----------------%<----------------------
#!/usr/bin/perl
use strict;
use warnings;
use YAML;
use FileHandle;
print "Freezing a filehandle created with 'open'.\n";
open FH, "/etc/passwd";
my $frozen_fh_1 = YAML::freeze(\*FH);
print "Freezing an object filehandle created with FileHandle.\n";
my $fh = new FileHandle;
my $frozen_fh_2 = YAML::freeze($fh);
-----------------%<----------------------
Let me know if there is more I can help with.
Thanks,
--
Matt Zagrabelny - mzagrabe@d.umn.edu - (218) 726 8844
University of Minnesota Duluth
Information Technology Systems & Services
PGP key 4096R/42A00942 2009-12-16
Fingerprint: 5814 2CCE 2383 2991 83FF C899 07E2 BFA8 42A0 0942
He is not a fool who gives up what he cannot keep to gain what he cannot
lose.
-Jim Elliot
Message body not shown because it is not plain text.