brummett / data-transform-explicitmetadata Goto Github PK
View Code? Open in Web Editor NEWTransform a Perl data structure into one with explicit metadata
Transform a Perl data structure into one with explicit metadata
This is a record of a bug recorded in RT at https://rt.cpan.org/Public/Bug/Display.html?id=130362
encode() will need to temporarily untie the var first, get the value, then retie
It often complains about not being able to open file descriptor $digit
http://www.cpantesters.org/cpan/report/3a8075b4-fcc5-11e3-a67d-9fe3ee8e7edf
Undefined subroutine &re::regexp_pattern called at /usr/home/cpan/pit/bare-clang/conf/perl-5.10.0/.cpanplus/5.10.0/build/Data-Transform-ExplicitMetadata-0.01/blib/lib/Data/Transform/ExplicitMetadata.pm line 103.
# Looks like you planned 34 tests but ran 25.
# Looks like your test exited with 9 just after 25.
t/basic.t ......
Dubious, test returned 9 (wstat 2304, 0x900)
You can get at the access mode with the IoTYPE
method. It would allow getting at that info even on Windows machines
depends on #1
After that's in place, we can load the module if necessary, look up the sub and point to the right ting
Triggered by brummett/Devel-hdb#61
See the comment in the linked issue, but basically encoding multiple non-ref GLOBs reuses a reference address for each one, and they mistakenly get encoded as all being references to whichever GLOB got encoded first.
as returned from Symbol::geniosym
FileHandle::Fmode can help with this
Win32:
http://www.cpantesters.org/cpan/report/e0c5219f-7a88-1014-a466-fd082b825c07
# Failed test 'encode bare filehandle'
# at t\basic.t line 105.
# Structures begin differing at:
# $got->{__value}{IOseek} = '0 but true'
# $expected->{__value}{IOseek} = undef
# Looks like you failed 1 test of 34.
t\basic.t ......
Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/34 subtests
t\blessed.t .... ok
# Failed test 'encode nested data structure'
# at t\nested.t line 104.
# Structures begin differing at:
# $got->{__value}{array}{__value}[3]{__value}{IOseek} = '0 but true'
# $expected->{__value}{array}{__value}[3]{__value}{IOseek} = undef
Data::Dumper::Streamer purports to do it inside _dump_format()
https://metacpan.org/source/YVES/Data-Dump-Streamer-2.38/lib/Data/Dump/Streamer.pm#L2781
It also refers to https://groups.google.com/forum/#!msg/comp.lang.perl.moderated/Vhg76vpuWnk/4IPZyCkjWg8J
sub deparse_format {
use B::Deparse;
# translate arg (or reference to it) into a B::* object
my $Bobj = B::svref_2object(ref $_[0] ? $_[0] : \$_[0]);
# if passed a glob or globref, get the format
$Bobj = B::GV::FORM($Bobj) if ref $Bobj eq 'B::GV';
if (ref $Bobj ne 'B::FM') {
require Carp;
Carp::croak "deparse_format: expected a glob, globref, or format ref";
}
my $deparser = B::Deparse::->new();
return $deparser->indent($deparser->deparse_format($Bobj));
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.