view release on metacpan or search on metacpan
lib/App/CamelPKI/CA.pm view on Meta::CPAN
my $cursor = $ca->database->search(name => "Fred");
is($cursor->revocation_time(), undef,
"The Fred's certificate is not yet revoked");
is(my $fredid = $cursor->infos->{uid}->[0], 43,
"Using CADB to get the Fred's UID")
or warn Data::Dumper::Dumper(scalar($cursor->infos));
# Fred got his operation, so he need a new certificate:
$ca->issue("App::CamelPKI::CertTemplate::Foo", $pubkey,
name => "Frida", uid => $fredid);
$cursor = $ca->database->search(name => "Fred", -revoked => undef);
isnt($cursor->revocation_time(), undef,
view all matches for this distribution
view release on metacpan or search on metacpan
eg/test-charm/hooks/install view on Meta::CPAN
#!/usr/bin/env perl
use charm;
use Data::Dumper;
my $docker = plugin 'docker', { version => 7 };
print Dumper($docker->version);
view all matches for this distribution
view release on metacpan or search on metacpan
devel/MyExtractUse.pm view on Meta::CPAN
# print "re: $re\n";
# my $str = "eval 'use Foo::Bar 3; 1' ";
# print "str: $str\n";
# if ($str =~ $use_eval_string_re) {
# print "match\n";
# require Data::Dumper;
# print Data::Dumper::Dumper(\%+);
# } else {
# print "no match\n";
# }
# exit 0;
devel/MyExtractUse.pm view on Meta::CPAN
$ret{'pos'} = pos($str);
$ret{'version'} = version->new($ret{'version'} || 0);
push @ret, \%ret;
if (DEBUG) {
require Data::Dumper;
print Data::Dumper::Dumper(\%ret);
}
}
};
# $str = _pod_to_comments ($str);
view all matches for this distribution
view release on metacpan or search on metacpan
use FindBin qw/ $RealBin /;
# use lib "$RealBin/lib";
use v5.30;
use File::Basename qw/ basename dirname /;
use Data::Dumper;
use Getopt::Long;
use Term::ANSIColor qw( colored );
use My::Color qw/ :all /;
use My::Opts;
view all matches for this distribution
view release on metacpan or search on metacpan
t/lib/Test/MySimple.pm view on Meta::CPAN
use warnings;
use parent 'App::Cmd::Simple';
our $VERSION = '0.123';
use Data::Dumper;
sub execute {
my ($self, $opt, $args) = @_;
local $Data::Dumper::Terse = 1;
print Dumper([ $opt, $args ]);
}
sub validate_args {
my ($self, $opt, $args) = @_;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Cmdline.pm view on Meta::CPAN
)
);
}
# The main job is implemented here
use Data::Dumper;
sub execute {
my ($self, $opt, $args) = @_;
print STDERR "Started...\n" unless $opt->quiet;
print STDOUT 'Options ($opt): ' . Dumper ($opt);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Cme/Command/dump.pm view on Meta::CPAN
use base qw/App::Cme::Common/;
use Config::Model::ObjTreeScanner;
use YAML::PP qw/Dump/;
use JSON;
use Data::Dumper;
sub validate_args {
my ($self, $opt, $args) = @_;
$self->check_unknown_args($args);
$opt->{quiet} = 1; # don't want to mess up yaml output
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/ColorNamer.pm view on Meta::CPAN
If C<get_name()> method fails, the error will be available as a human
readable string returned by C<error()> method.
=head2 C<known_colors>
use Data::Dumper;
print Dumper $app->known_colors;
$VAR1 = {
'rgb' => {
'r' => 255,
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Conf.pm view on Meta::CPAN
$conf = $context->conf();
print $conf->dump(), "\n";
=cut
use Data::Dumper;
sub dump {
my ($self) = @_;
my %copy = %$self;
delete $copy{context}; # don't dump the reference to the context itself
my $d = Data::Dumper->new([ \%copy ], [ "conf" ]);
$d->Indent(1);
return $d->Dump();
}
1;
view all matches for this distribution
view release on metacpan or search on metacpan
t/files/indent.snapshot view on Meta::CPAN
Module::Build::PodParser 0.4224
requirements:
CPAN::Meta 2.142060
CPAN::Meta::YAML 0.003
Cwd 0
Data::Dumper 0
ExtUtils::CBuilder 0.27
ExtUtils::Install 0
ExtUtils::Manifest 0
ExtUtils::Mkbootstrap 0
ExtUtils::ParseXS 2.21
view all matches for this distribution
view release on metacpan or search on metacpan
use warnings;
use Config;
use POSIX ();
use Cwd;
use ExtUtils::MakeMaker;
use Data::Dumper;
our $VERSION = "1.00";
my $cpan = "www.cpan.org";
my $cdir0 = "~/.cpanx";
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/CriticDB.pm view on Meta::CPAN
$criticdb->collect('/path/to/lib');
The C<type> may be:
storable Storable (default)
dump Data::Dumper (not yet available)
Note that L<Data::Dumper> files can be useful for debugging purposes but are not recommended for long term use, as they can be 10--30x slower for read/write operations.
=head1 REPORTING
Output similar to C<perlcritic> can be produced by calling as
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Critique/Command/collect.pm view on Meta::CPAN
PROCESS_LOOP:
while ( @partitions ) {
my ($start, $end) = @{ shift @partitions };
#use Data::Dumper;
#warn Dumper [ $start, $end ];
$pm->start and next PROCESS_LOOP;
my @filtered;
view all matches for this distribution
view release on metacpan or search on metacpan
xt/cntrl_db_browser.t view on Meta::CPAN
my $use_lib = 0;
my $warn_to_fatal = 0;
open my $fh, '<', $file or die $!;
while ( my $line = <$fh> ) {
if ( $line =~ /^\s*use\s+Data::Dumper/s ) {
$data_dumper++;
}
if ( $line =~ /^\s*use\s+warnings\s+FATAL/s ) {
$warnings++;
}
xt/cntrl_db_browser.t view on Meta::CPAN
$warn_to_fatal++;
}
}
close $fh;
is( $data_dumper, 0, 'OK - Data::Dumper in "' . basename( $file ) . '" disabled.' );
is( $warnings, 0, 'OK - warnings FATAL in "' . basename( $file ) . '" disabled.' );
is( $use_lib, 0, 'OK - no "use lib" in "' . basename( $file ) . '"' );
is( $warn_to_fatal, 0, 'OK - no "warn to fatal" in "' . basename( $file ) . '"' );
}
view all matches for this distribution
view release on metacpan or search on metacpan
"perl" : "5.010"
}
},
"test" : {
"requires" : {
"Data::Dumper" : "0",
"Test::More" : "0",
"lib" : "0"
}
}
},
view all matches for this distribution
view release on metacpan or search on metacpan
scripts/network-interface-info.pl view on Meta::CPAN
use Net::IP;
use Net::ISC::DHCPClient;
use POSIX qw();
use Getopt::Long;
use Pod::Usage;
use Data::Dumper;
use warnings;
use strict;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/DNS/Adblock.pm view on Meta::CPAN
use Mozilla::CA;
use POSIX qw( strftime );
use Carp;
use Data::Dumper;
use Storable qw(freeze thaw);
my $attributes;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/DPath.pm view on Meta::CPAN
my $ini = Config::INI::Serializer->new;
$output .= $ini->serialize($resultlist);
}
elsif ($outtype eq "dumper")
{
require Data::Dumper;
$output .= Data::Dumper::Dumper($resultlist);
}
elsif ($outtype eq "xml")
{
require XML::Simple;
my $xs = new XML::Simple;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Dapper.pm view on Meta::CPAN
use YAML::PP qw/ Load Dump LoadFile DumpFile /;
use File::Spec::Functions qw/ canonpath /;
use File::Path qw(make_path);
use Data::Dumper;
$Data::Dumper::Indent = 1;
$Data::Dumper::Sortkeys = 1;
use DateTime;
use DateTime::Format::XSD;
use App::Dapper::Serve;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Deps/Verify.pm view on Meta::CPAN
{
my ( $self, $args ) = @_;
my %not_found;
foreach my $mods ( @{ $args->{inputs} } )
{
use Data::Dumper;
# die Dumper($mods);
my @required_modules = keys %{$mods};
REQUIRED:
view all matches for this distribution
view release on metacpan or search on metacpan
scripts/dex view on Meta::CPAN
DumpFile($filenhandle @documents);
Some utility scripts, mostly useful for debugging:
# Load YAML into a data structure and dump with Data::Dumper
yamlpp-load < file.yaml
# Load and Dump
yamlpp-load-dump < file.yaml
scripts/dex view on Meta::CPAN
=item Complex Keys
Mapping Keys in YAML can be more than just scalars. Of course, you can't load
that into a native perl structure. The Constructor will stringify those keys
with L<Data::Dumper> instead of just returning something like
C<HASH(0x55dc1b5d0178)>.
Example:
use YAML::PP;
scripts/dex view on Meta::CPAN
my ($self, $data) = @_;
return $data if (
ref $data eq 'YAML::PP::Preserve::Scalar'
and ($self->preserve_scalar_style or $self->preserve_alias)
);
require Data::Dumper;
local $Data::Dumper::Quotekeys = 0;
local $Data::Dumper::Terse = 1;
local $Data::Dumper::Indent = 0;
local $Data::Dumper::Useqq = 0;
local $Data::Dumper::Sortkeys = 1;
my $string = Data::Dumper->Dump([$data], ['data']);
$string =~ s/^\$data = //;
return $string;
}
1;
scripts/dex view on Meta::CPAN
=item stringify_complex
When constructing a hash and getting a non-scalar key, this method is
used to stringify the key.
It uses a terse Data::Dumper output. Other modules, like L<YAML::XS>, use
the default stringification, C<ARRAY(0x55617c0c7398)> for example.
=back
=cut
scripts/dex view on Meta::CPAN
use strict;
use warnings;
package YAML::PP::Emitter;
our $VERSION = '0.027'; # VERSION
use Data::Dumper;
use YAML::PP::Common qw/
YAML_PLAIN_SCALAR_STYLE YAML_SINGLE_QUOTED_SCALAR_STYLE
YAML_DOUBLE_QUOTED_SCALAR_STYLE
YAML_LITERAL_SCALAR_STYLE YAML_FOLDED_SCALAR_STYLE
scripts/dex view on Meta::CPAN
$tag = $self->emit_tag('scalar', $tag);
}
$props = join ' ', grep defined, ($anchor, $tag);
my $style = $info->{style};
DEBUG and local $Data::Dumper::Useqq = 1;
$value = '' unless defined $value;
my $first = substr($value, 0, 1);
if ($value eq '') {
if ($flow and $last->{type} ne 'MAPVALUE' and $last->{type} ne 'MAP') {
scripts/dex view on Meta::CPAN
$value = join "\n", @lines;
$value =~ s/'/''/g;
$value = "'" . $value . "'";
}
elsif ($style == YAML_LITERAL_SCALAR_STYLE) {
DEBUG and warn __PACKAGE__.':'.__LINE__.$".Data::Dumper->Dump([\$value], ['value']);
my $indicators = '';
if ($value =~ m/\A\n* +/) {
$indicators .= $self->indent;
}
my $indent = $indent . ' ' x $self->indent;
scripts/dex view on Meta::CPAN
}
$value =~ s/^(?=.)/$indent/gm;
$value = "|$indicators\n$value";
}
elsif ($style == YAML_FOLDED_SCALAR_STYLE) {
DEBUG and warn __PACKAGE__.':'.__LINE__.$".Data::Dumper->Dump([\$value], ['value']);
my @lines = split /\n/, $value, -1;
DEBUG and warn __PACKAGE__.':'.__LINE__.$".Data::Dumper->Dump([\@lines], ['lines']);
my $eol = 0;
my $indicators = '';
if ($value =~ m/\A\n* +/) {
$indicators .= $self->indent;
}
scripts/dex view on Meta::CPAN
my $remaining_yaml = $self->{yaml};
$remaining_yaml = '' unless defined $remaining_yaml;
$yaml .= $remaining_yaml;
{
local $@; # avoid bug in old Data::Dumper
require Data::Dumper;
local $Data::Dumper::Useqq = 1;
local $Data::Dumper::Terse = 1;
$yaml = Data::Dumper->Dump([$yaml], ['yaml']);
chomp $yaml;
}
my $lines = 5;
my @fields;
scripts/dex view on Meta::CPAN
#
# my $event_types = $self->events;
# my $properties;
# my @send_events;
# for my $event (@$event_stack) {
# TRACE and warn __PACKAGE__.':'.__LINE__.$".Data::Dumper->Dump([\$event], ['event']);
# my ($type, $info) = @$event;
# if ($type eq 'properties') {
# $properties = $info;
# }
# elsif ($type eq 'scalar') {
scripts/dex view on Meta::CPAN
TRACE and $self->debug_tokens($next_tokens);
unless (@$next_tokens) {
$self->exception("No more tokens");
}
TRACE and warn __PACKAGE__.':'.__LINE__.$".Data::Dumper->Dump([\$next_tokens->[0]], ['next_token']);
my $got = $next_tokens->[0]->{name};
if ($got eq 'CONTEXT') {
my $context = shift @$next_tokens;
my $indent = $offsets->[-1];
$indent++ unless $self->lexer->flowcontext;
scripts/dex view on Meta::CPAN
warn Term::ANSIColor::colored(["magenta"], "============ $str"), "\n";
}
sub debug_rules {
my ($self, $rules) = @_;
local $Data::Dumper::Maxdepth = 2;
$self->note("RULES:");
for my $rule ($rules) {
if (ref $rule eq 'ARRAY') {
my $first = $rule->[0];
if (ref $first eq 'SCALAR') {
scripts/dex view on Meta::CPAN
for my $token (@$tokens) {
my $type = Term::ANSIColor::colored(["green"],
sprintf "%-22s L %2d C %2d ",
$token->{name}, $token->{line}, $token->{column} + 1
);
local $Data::Dumper::Useqq = 1;
local $Data::Dumper::Terse = 1;
require Data::Dumper;
my $str = Data::Dumper->Dump([$token->{value}], ['str']);
chomp $str;
$str =~ s/(^.|.$)/Term::ANSIColor::colored(['blue'], $1)/ge;
warn "$type$str\n";
}
scripts/dex view on Meta::CPAN
for my $i (0 .. $#$lines) {
$string .= $lines->[ $i ];
$string .= "\n" if ($i != $#$lines or not $trim);
}
}
TRACE and warn __PACKAGE__.':'.__LINE__.$".Data::Dumper->Dump([\$string], ['string']);
return $string;
}
sub render_multi_val {
my ($self, $multi) = @_;
view all matches for this distribution
view release on metacpan or search on metacpan
bin/app_dispatch view on Meta::CPAN
exit 1;
}
sub debug {
my $self = shift;
require Data::Dumper;
print Data::Dumper::Dumper($self);
}
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/DistSync.pm view on Meta::CPAN
my @skip_keys = @{(SKIPFILES)};
my $maniskip = maniread($self->{file_maniskip}, SKIPMODE); # MANIFEST.SKIP
push @skip_keys, keys %$maniskip if ref($maniskip) eq 'HASH';
for (@skip_keys) {$skips{$_} = qrreconstruct($_)}
debug("Found %d keys in the list of skipped files", scalar(keys %skips));
#debug(Data::Dumper::Dumper(\%skips)) && return 0;
}
# Deleting files listed in the MANIFEST.DEL file but not in the exclusion list
{
debug("Deleting files from list: %s", MANIDEL);
lib/App/DistSync.pm view on Meta::CPAN
$expire = $dt if $dt > $expire;
}
$expire = _expire(EXPIRE) unless $expire > 0;
debug("The file '$delfile' will expire on %s", scalar(localtime($deltime + $expire)))
if $deltime;
#debug(Data::Dumper::Dumper($dellist)) && return 0;
if ($deltime && (time - $deltime) > $expire) { # MANIFEST.DEL is expired!
# Delete files physically if they exist physically and are not on the exclusion list!
foreach my $k (keys %$dellist) {
if (_skipcheck(\%skips, $k)) { # The file is in the exclusion list.
debug("> [SKIPPED] %s", $k);
lib/App/DistSync.pm view on Meta::CPAN
}
my $mt_l = $manifest->{$k}[0] || 0; # Modified time (local, left)
my $mt_r = $remote_manifest->{$k}[0] || 0; # Modified time (remote, right)
$mtmp{$k}++ if $mt_l && $mt_r && $mt_l == $mt_r; # =2 if the files are identical
}
#debug(Data::Dumper::Dumper(\%mtmp));
# Getting the difference between the lists of local and remote files
#
# [=] The files do not differ; they are identical in both lists
# [<] The file exists in the local (left) file list
lib/App/DistSync.pm view on Meta::CPAN
} else {
debug("> [SKIPPED] %s (%s)", $k, $f);
}
}
}
#debug(Data::Dumper::Dumper(\%delete_list));
# Iterate through the synchronization list and download all files that
# are NOT present in the previously generated deletion list.
#debug(Data::Dumper::Dumper(\%sync_list));
{
debug("Downloading files");
my $total = 0; # Size
my $cnt = 0; # File number
my $all = scalar(keys %sync_list);
lib/App/DistSync.pm view on Meta::CPAN
foreach my $k (keys %$new_manifest) {
my $nskip = _skipcheck(\%skips, $k);
delete $new_manifest->{$k} if $nskip;
debug("> [%s] %s", $nskip ? "SKIPPED" : " ADDED ", $k);
}
#debug(Data::Dumper::Dumper($new_manifest));
# Save the created file
debug("Saving manifest to %s", MANIFEST);
return 0 unless maniwrite($self->{file_manifest}, $new_manifest);
lib/App/DistSync.pm view on Meta::CPAN
# Getting list files from MANIFEST.DEL file but not in the exclusion list
{
debug("Getting list files from: %s", MANIDEL);
my $delfile = $self->{file_manidel}; # MANIFEST.DEL
my $dellist = maniread($delfile) // {}; # { file => expire };
#debug(Data::Dumper::Dumper($dellist));
# Check by exclusion list
foreach my $k (keys %$dellist) {
if (_skipcheck(\%skips, $k)) { # The file is in the exclusion list.
debug("> [SKIPPED] %s", $k);
lib/App/DistSync.pm view on Meta::CPAN
}
# Adding files listed in MANIFEST.DEL to the exclusion list
$skips{$k} = qrreconstruct($k);
}
#debug(Data::Dumper::Dumper(\%skips));
}
# Cteating MANIFEST file
debug("Generating new manifest");
my $new_manifest = manifind($self->dir);
lib/App/DistSync.pm view on Meta::CPAN
foreach my $k (keys %$new_manifest) {
my $nskip = _skipcheck(\%skips, $k);
delete $new_manifest->{$k} if $nskip;
debug("> [%s] %s", $nskip ? "SKIPPED" : " ADDED ", $k);
}
#debug(Data::Dumper::Dumper($new_manifest));
# Save the created file
debug("Saving manifest to %s", MANIFEST);
return 0 unless maniwrite($self->{file_manifest}, $new_manifest);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Dochazka/CLI.pm view on Meta::CPAN
use 5.012;
use strict;
use warnings;
use App::CELL qw( $CELL );
use Data::Dumper;
use Exporter 'import';
use Test::More;
view all matches for this distribution
view release on metacpan or search on metacpan
t/model/model.t view on Meta::CPAN
use 5.012;
use strict;
use warnings;
use Data::Dumper;
use Test::Fatal;
use Test::More;
use App::Dochazka::Common::Model;
view all matches for this distribution
view release on metacpan or search on metacpan
config/Component_Config.pm view on Meta::CPAN
{
path => 'sample/site_param.mc',
source => <<'EOS',
<%class>
has 'param' => (isa => 'Str', required => 1);
use Data::Dumper;
</%class>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
config/Component_Config.pm view on Meta::CPAN
<title>Dochazka Site Param</title>
</head>
<body>
<pre>
$site_param_name = '<% $.param %>';
<% Data::Dumper->Dump( [ $site->get($.param) ], [ 'site_param_value' ] ) %>
</pre>
</body>
</html>
EOS
acl => 'admin',
config/Component_Config.pm view on Meta::CPAN
path => 'suse-cz-monthly.mc',
source => <<'EOS',
<%class>
has 'employee' => (isa => 'HashRef', required => 1);
has 'tsrange' => (isa => 'Str', required => 1);
use Data::Dumper;
</%class>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>Dochazka Monthly Report</title>
</head>
<body>
<pre>
<% Data::Dumper->Dump( [ $.employee ], [ 'employee' ] ) %>
$tsrange = '<% $.tsrange %>';
</pre>
</body>
</html>
EOS
view all matches for this distribution