Data-Dump-HTML-PopUp
view release on metacpan or search on metacpan
NAME
Data::Dump::HTML::PopUp - Dump Perl data structures as HTML document
with nested pop ups
VERSION
This document describes version 0.001 of Data::Dump::HTML::PopUp (from
Perl distribution Data-Dump-HTML-PopUp), released on 2024-03-17.
SYNOPSIS
use Data::Dump::HTML::PopUp; # exports dd(), can export dump()
dd [1, 2, 3];
DESCRIPTION
This module is a Data::Dump variant that dumps Perl data structure to
HTML document where you can expand and collapse nodes to drill down and
roll up your data. The nodes will expand in (nested) pop up modal
dialogs. It currently uses jQuery [1] and Modally [2] JavaScript
libraries.
There are other collapsible HTML dumper modules on CPAN (see "SEE
ALSO").
VARIABLES
$Data::Dump::HTML::PopUp::OPT_PERL_VERSION
String, default: 5.010.
Set target Perl version. If you set this to, say 5.010, then the dumped
code will keep compatibility with Perl 5.10.0. This is used in the
following ways:
* passed to Regexp::Stringify
* when dumping code references
For example, in perls earlier than 5.016, feature.pm does not
understand:
no feature ':all';
so we replace it with:
no feature;
$Data::Dump::HTML::PopUp::OPT_REMOVE_PRAGMAS
Bool, default: 0.
If set to 1, then pragmas at the start of coderef dump will be removed.
Coderef dump is produced by B::Deparse and is of the form like:
sub { use feature 'current_sub', 'evalbytes', 'fc', 'say', 'state', 'switch', 'unicode_strings', 'unicode_eval'; $a <=> $b }
If you want to dump short coderefs, the pragmas might be distracting.
You can turn turn on this option which will make the above dump become:
sub { $a <=> $b }
Note that without the pragmas, the dump might be incorrect.
$Data::Dump::HTML::PopUp::::OPT_DEPARSE
Bool, default: 1.
Can be set to 0 to skip deparsing code. Coderefs will be dumped as
"sub{"DUMMY"}" instead, like in Data::Dump.
$Data::Dump::HTML::PopUp::::OPT_STRINGIFY_NUMBERS
Bool, default: 0.
If set to true, will dump numbers as quoted string, e.g. 123 as "123"
instead of 123. This might be helpful if you want to compute the hash of
or get a canonical representation of data structure.
$Data::Dump::HTML::PopUp::::OPT_LIBRARY_LINK_MODE
Str, default: "local". Valid values: "none", "embed", "local", "cdn".
Specify how the JavaScript libraries should be linked in the generated
HTML page. The JavaScript libraries are linked at the preamble which is
generated before the actual dump:
<link rel="stylesheet" href="jquery.modally.css">
<script src="jquery.min.js"></script>
<script src="jquery.modally.js"></script>
If the setting is set to "none", then no preamble will be produced at
all. If the setting is set to "embed", then instead of being linked, the
source code of the JavaScript libraries will be directly embedded. If
the setting is set to "local", then the links will be to the local
filesystem to the library files included in the distribution's shared
directory. If the setting is set to "cdn", then the links will be to the
CDN URLs.
FUNCTIONS
dd
dump
HOMEPAGE
Please visit the project's homepage at
<https://metacpan.org/release/Data-Dump-HTML-PopUp>.
SOURCE
( run in 1.589 second using v1.01-cache-2.11-cpan-39bf76dae61 )