App-ppgrep
view release on metacpan or search on metacpan
script/_ppgrep view on Meta::CPAN
#use Exporter;
#push @YAML::Old::ISA, 'Exporter';
#our @EXPORT = qw{ Dump Load };
#our @EXPORT_OK = qw{ freeze thaw DumpFile LoadFile Bless Blessed };
#our (
# $UseCode, $DumpCode, $LoadCode,
# $SpecVersion,
# $UseHeader, $UseVersion, $UseBlock, $UseFold, $UseAliases,
# $Indent, $SortKeys, $Preserve,
# $AnchorPrefix, $CompressSeries, $InlineSeries, $Purity,
# $Stringify, $Numify
#);
#
#
#use YAML::Old::Node; # XXX This is a temp fix for Module::Build
#use Scalar::Util qw/ openhandle /;
#
## XXX This VALUE nonsense needs to go.
#use constant VALUE => "\x07YAML\x07VALUE\x07";
#
## YAML Object Properties
#has dumper_class => default => sub {'YAML::Old::Dumper'};
#has loader_class => default => sub {'YAML::Old::Loader'};
#has dumper_object => default => sub {$_[0]->init_action_object("dumper")};
#has loader_object => default => sub {$_[0]->init_action_object("loader")};
#
#sub Dump {
# my $yaml = YAML::Old->new;
# $yaml->dumper_class($YAML::DumperClass)
# if $YAML::DumperClass;
# return $yaml->dumper_object->dump(@_);
#}
#
#sub Load {
# my $yaml = YAML::Old->new;
# $yaml->loader_class($YAML::LoaderClass)
# if $YAML::LoaderClass;
# return $yaml->loader_object->load(@_);
#}
#
#{
# no warnings 'once';
# # freeze/thaw is the API for Storable string serialization. Some
# # modules make use of serializing packages on if they use freeze/thaw.
# *freeze = \ &Dump;
# *thaw = \ &Load;
#}
#
#sub DumpFile {
# my $OUT;
# my $filename = shift;
# if (openhandle $filename) {
# $OUT = $filename;
# }
# else {
# my $mode = '>';
# if ($filename =~ /^\s*(>{1,2})\s*(.*)$/) {
# ($mode, $filename) = ($1, $2);
# }
# open $OUT, $mode, $filename
# or YAML::Old::Mo::Object->die('YAML_DUMP_ERR_FILE_OUTPUT', $filename, "$!");
# }
# binmode $OUT, ':utf8'; # if $Config{useperlio} eq 'define';
# local $/ = "\n"; # reset special to "sane"
# print $OUT Dump(@_);
# unless (ref $filename eq 'GLOB') {
# close $OUT
# or do {
# my $errsav = $!;
# YAML::Old::Mo::Object->die('YAML_DUMP_ERR_FILE_OUTPUT_CLOSE', $filename, $errsav);
# }
# }
#}
#
#sub LoadFile {
# my $IN;
# my $filename = shift;
# if (openhandle $filename) {
# $IN = $filename;
# }
# else {
# open $IN, '<', $filename
# or YAML::Old::Mo::Object->die('YAML_LOAD_ERR_FILE_INPUT', $filename, "$!");
# }
# binmode $IN, ':utf8'; # if $Config{useperlio} eq 'define';
# return Load(do { local $/; <$IN> });
#}
#
#sub init_action_object {
# my $self = shift;
# my $object_class = (shift) . '_class';
# my $module_name = $self->$object_class;
# eval "require $module_name";
# $self->die("Error in require $module_name - $@")
# if $@ and "$@" !~ /Can't locate/;
# my $object = $self->$object_class->new;
# $object->set_global_options;
# return $object;
#}
#
#my $global = {};
#sub Bless {
# require YAML::Old::Dumper::Base;
# YAML::Old::Dumper::Base::bless($global, @_)
#}
#sub Blessed {
# require YAML::Old::Dumper::Base;
# YAML::Old::Dumper::Base::blessed($global, @_)
#}
#sub global_object { $global }
#
#1;
### YAML/Old/Dumper.pm ###
#package YAML::Old::Dumper;
#
#use YAML::Old::Mo;
#extends 'YAML::Old::Dumper::Base';
#
#use YAML::Old::Dumper::Base;
#use YAML::Old::Node;
#use YAML::Old::Types;
#use Scalar::Util qw();
#use B ();
#use Carp ();
#
## Context constants
#use constant KEY => 3;
#use constant BLESSED => 4;
#use constant FROMARRAY => 5;
#use constant VALUE => "\x07YAML\x07VALUE\x07";
#
## Common YAML character sets
#my $ESCAPE_CHAR = '[\\x00-\\x08\\x0b-\\x0d\\x0e-\\x1f]';
#my $LIT_CHAR = '|';
#
##==============================================================================
## OO version of Dump. YAML->new->dump($foo);
#sub dump {
# my $self = shift;
# $self->stream('');
# $self->document(0);
# for my $document (@_) {
# $self->{document}++;
script/_ppgrep view on Meta::CPAN
#
#has 'code';
#has 'type' => default => sub {'Error'};
#has 'line';
#has 'document';
#has 'arguments' => default => sub {[]};
#
#my ($error_messages, %line_adjust);
#
#sub format_message {
# my $self = shift;
# my $output = 'YAML::Old ' . $self->type . ': ';
# my $code = $self->code;
# if ($error_messages->{$code}) {
# $code = sprintf($error_messages->{$code}, @{$self->arguments});
# }
# $output .= $code . "\n";
#
# $output .= ' Code: ' . $self->code . "\n"
# if defined $self->code;
# $output .= ' Line: ' . $self->line . "\n"
# if defined $self->line;
# $output .= ' Document: ' . $self->document . "\n"
# if defined $self->document;
# return $output;
#}
#
#sub error_messages {
# $error_messages;
#}
#
#%$error_messages = map {s/^\s+//;s/\\n/\n/;$_} split "\n", <<'...';
#YAML_PARSE_ERR_BAD_CHARS
# Invalid characters in stream. This parser only supports printable ASCII
#YAML_PARSE_ERR_BAD_MAJOR_VERSION
# Can't parse a %s document with a 1.0 parser
#YAML_PARSE_WARN_BAD_MINOR_VERSION
# Parsing a %s document with a 1.0 parser
#YAML_PARSE_WARN_MULTIPLE_DIRECTIVES
# '%s directive used more than once'
#YAML_PARSE_ERR_TEXT_AFTER_INDICATOR
# No text allowed after indicator
#YAML_PARSE_ERR_NO_ANCHOR
# No anchor for alias '*%s'
#YAML_PARSE_ERR_NO_SEPARATOR
# Expected separator '---'
#YAML_PARSE_ERR_SINGLE_LINE
# Couldn't parse single line value
#YAML_PARSE_ERR_BAD_ANCHOR
# Invalid anchor
#YAML_DUMP_ERR_INVALID_INDENT
# Invalid Indent width specified: '%s'
#YAML_LOAD_USAGE
# usage: YAML::Old::Load($yaml_stream_scalar)
#YAML_PARSE_ERR_BAD_NODE
# Can't parse node
#YAML_PARSE_ERR_BAD_EXPLICIT
# Unsupported explicit transfer: '%s'
#YAML_DUMP_USAGE_DUMPCODE
# Invalid value for DumpCode: '%s'
#YAML_LOAD_ERR_FILE_INPUT
# Couldn't open %s for input:\n%s
#YAML_DUMP_ERR_FILE_CONCATENATE
# Can't concatenate to YAML file %s
#YAML_DUMP_ERR_FILE_OUTPUT
# Couldn't open %s for output:\n%s
#YAML_DUMP_ERR_FILE_OUTPUT_CLOSE
# Error closing %s:\n%s
#YAML_DUMP_ERR_NO_HEADER
# With UseHeader=0, the node must be a plain hash or array
#YAML_DUMP_WARN_BAD_NODE_TYPE
# Can't perform serialization for node type: '%s'
#YAML_EMIT_WARN_KEYS
# Encountered a problem with 'keys':\n%s
#YAML_DUMP_WARN_DEPARSE_FAILED
# Deparse failed for CODE reference
#YAML_DUMP_WARN_CODE_DUMMY
# Emitting dummy subroutine for CODE reference
#YAML_PARSE_ERR_MANY_EXPLICIT
# More than one explicit transfer
#YAML_PARSE_ERR_MANY_IMPLICIT
# More than one implicit request
#YAML_PARSE_ERR_MANY_ANCHOR
# More than one anchor
#YAML_PARSE_ERR_ANCHOR_ALIAS
# Can't define both an anchor and an alias
#YAML_PARSE_ERR_BAD_ALIAS
# Invalid alias
#YAML_PARSE_ERR_MANY_ALIAS
# More than one alias
#YAML_LOAD_ERR_NO_CONVERT
# Can't convert implicit '%s' node to explicit '%s' node
#YAML_LOAD_ERR_NO_DEFAULT_VALUE
# No default value for '%s' explicit transfer
#YAML_LOAD_ERR_NON_EMPTY_STRING
# Only the empty string can be converted to a '%s'
#YAML_LOAD_ERR_BAD_MAP_TO_SEQ
# Can't transfer map as sequence. Non numeric key '%s' encountered.
#YAML_DUMP_ERR_BAD_GLOB
# '%s' is an invalid value for Perl glob
#YAML_DUMP_ERR_BAD_REGEXP
# '%s' is an invalid value for Perl Regexp
#YAML_LOAD_ERR_BAD_MAP_ELEMENT
# Invalid element in map
#YAML_LOAD_WARN_DUPLICATE_KEY
# Duplicate map key '%s' found. Ignoring.
#YAML_LOAD_ERR_BAD_SEQ_ELEMENT
# Invalid element in sequence
#YAML_PARSE_ERR_INLINE_MAP
# Can't parse inline map
#YAML_PARSE_ERR_INLINE_SEQUENCE
# Can't parse inline sequence
#YAML_PARSE_ERR_BAD_DOUBLE
# Can't parse double quoted string
#YAML_PARSE_ERR_BAD_SINGLE
# Can't parse single quoted string
#YAML_PARSE_ERR_BAD_INLINE_IMPLICIT
# Can't parse inline implicit value '%s'
#YAML_PARSE_ERR_BAD_IMPLICIT
# Unrecognized implicit value '%s'
#YAML_PARSE_ERR_INDENTATION
# Error. Invalid indentation level
#YAML_PARSE_ERR_INCONSISTENT_INDENTATION
# Inconsistent indentation level
#YAML_LOAD_WARN_UNRESOLVED_ALIAS
# Can't resolve alias *%s
#YAML_LOAD_WARN_NO_REGEXP_IN_REGEXP
( run in 2.717 seconds using v1.01-cache-2.11-cpan-39bf76dae61 )