Archive-TarGzip
view release on metacpan or search on metacpan
t/Archive/Data/Secs2.pm view on Meta::CPAN
=item 'SCALAR'
the scalar
=item 'REF'
the reference
=item 'CODE'
the reference
=item 'GLOB'
values of the C<GLOB> in the
following order:
*$var{SCALAR},
*$var{ARRAY},
*$var{HASH},
*$var{CODE},
*$var{IO},
*$var{NAME},
*$var{PACKAGE},
"*$var"
=back
If the C<arrayify> subroutine encounters an event where it cannot
continue, it halts processing, and returns the
event as a scalar string, with the subroutine name and version.
If the reference of the C<arrayify> subroutine return is a 'C<ARRAY>',
the return is C<\@array>; otherwise it is a scalar text event
message.
The events are as follows:
"Unknown underlying data type\n"
=head2 config
$old_value = config( $option );
$old_value = config( $option => $new_value);
(@all_options) = config( );
When Perl loads
the C<Data::Secs2> program module,
Perl creates a
C<$Data::Secs2::default_options> object
using the C<new> method which
inherits L<Data::Startup|Data::Startup>.
Using the C<config> as a subroutine
config(@_)
writes and reads
the C<$Data::Secs2::default_options> object
directly using the L<Data::Startup::config|Data::Startup/config>
method.
Avoided the C<config> and in multi-threaded environments
where separate threads are using C<Data::Secs2>.
All other subroutines are multi-thread safe.
They use C<override> to obtain a copy of the
C<$Data::Secs2::default_options> and apply any option
changes to the copy keeping the original intact.
Using the C<config> as a method,
$options->config(@_)
writes and reads the C<$options> object
using the L<Data::Startup::config|Data::Startup/config>
method.
It goes without saying that that object
should have been created using one of
the following or equivalent:
$default_options = $class->Data::Secs2::new(@_);
$default_options = new Data::Secs2(@_);
$options = $default_options->override(@_);
The underlying object data for the C<Data::Secs2>
class of objects is a hash. For object oriented
conservative purist, the C<config> subroutine is
the accessor function for the underlying object
hash.
Since the data are all options whose names and
usage is frozen as part of the C<Data::Secs2>
interface, the more liberal minded, may avoid the
C<config> accessor function layer, and access the
object data directly.
The options are as follows:
values
subroutine option default 1sts
----------------------------------------------------------
die
warn
arrayify
listify
neuterify obj_format_code '', 'S','P'
add_obj_format_code 0
scalar 0 1
unpack_num 'Data::SecsPack' {}
perlify
perl_typify
secsify spaces ' ', (' ' x n)
type 'ascii','binary
secs_elementify type 'ascii','binary
scalar 0 1
pack_num 'Data::SecsPack' {}
stringify
transify obj_format_code '', 'S','P'
add_obj_format_code 0
( run in 0.749 second using v1.01-cache-2.11-cpan-c966e8aa7e8 )