Data-Scan
view release on metacpan or search on metacpan
lib/Data/Scan/Impl/Printer.pm view on Meta::CPAN
has array_end => (is => 'ro', isa => Str, default => sub { return ']' });
has hash_start => (is => 'ro', isa => Str, default => sub { return ' {' });
has hash_next => (is => 'ro', isa => Str, default => sub { return ',' });
has hash_end => (is => 'ro', isa => Str, default => sub { return '}' });
has hash_separator => (is => 'ro', isa => Str, default => sub { return ' => ' });
has indice_start => (is => 'ro', isa => Str, default => sub { return '[' });
has indice_end => (is => 'ro', isa => Str, default => sub { return '] ' });
has with_indices_full => (is => 'ro', isa => Bool, default => sub { return !!0 });
has address_start => (is => 'ro', isa => Str, default => sub { return '(' });
has address_format => (is => 'ro', isa => Str, default => sub { return '0x%x' });
has address_end => (is => 'ro', isa => Str, default => sub { return ')' });
has ref_start => (is => 'ro', isa => Str, default => sub { return '\\' });
has ref_end => (is => 'ro', isa => Str, default => sub { return '' });
has with_address => (is => 'ro', isa => Bool, default => sub { return !!0 });
has with_array_indice => (is => 'ro', isa => Bool, default => sub { return !!1 });
has with_hash_indice => (is => 'ro', isa => Bool, default => sub { return !!1 });
has with_deparse => (is => 'ro', isa => Bool, default => sub { return !!0 });
has with_methods => (is => 'ro', isa => Bool, default => sub { return !!0 });
has with_filename => (is => 'ro', isa => Bool, default => sub { return !!0 });
has buffered => (is => 'ro', isa => Bool, default => sub { return !!0 });
has colors => (is => 'ro', isa => HashRef[Str|Undef], default => sub {
return {
blessed => 'bold',
string => undef,
regexp => undef,
array_start => 'blue',
array_next => 'blue',
array_end => 'blue',
hash_start => 'blue',
hash_separator => 'blue',
hash_next => 'blue',
hash_end => 'blue',
ref_start => undef,
ref_end => undef,
indice_full => 'magenta',
indice_start => 'magenta',
indice_value => 'magenta',
indice_end => 'magenta',
undef => 'red',
unknown => 'bold red',
address_start => 'magenta',
address_value => 'magenta',
address_end => 'magenta',
code => 'yellow',
already_scanned => 'green'
}
}
);
#
# Internal attributes - Note that they are ALL explicitely setted in dsstart()
# and because they are internal we give us the right to access them
# in the dirty way
#
has _lines => (is => 'rwp', isa => Undef|ArrayRef[ArrayRef]);
has _currentLevel => (is => 'rwp', isa => Undef|PositiveOrZeroInt);
has _currentIndicePerLevel => (is => 'rwp', isa => Undef|ArrayRef[PositiveOrZeroInt]);
has _currentReftypePerLevel => (is => 'rwp', isa => Undef|ArrayRef[Str]);
has _seen => (is => 'rwp', isa => Undef|HashRef[PositiveOrZeroInt]);
has _indice_start_nospace => (is => 'rwp', isa => Undef|Str); # C.f. BUILD
has _indice_end_nospace => (is => 'rwp', isa => Undef|Str);
has _colors_cache => (is => 'rwp', isa => Undef|HashRef[Str|Undef]);
has _concatenatedLevels => (is => 'rwp', isa => Undef|ArrayRef[Str]);
#
# Required methods
#
sub dsstart {
my ($self, @args) = @_;
$self->_set__lines([[]]);
$self->_set__currentLevel(0);
$self->_set__currentIndicePerLevel([]);
$self->_set__currentReftypePerLevel([]);
$self->_set__seen({});
( run in 2.098 seconds using v1.01-cache-2.11-cpan-39bf76dae61 )