Archive-Ar-Libarchive
view release on metacpan or search on metacpan
my $value = $ar->get_opt($name);
Returns the value of the option $name.
type
my $type = $ar->type;
Returns the type of the ar archive. The type is undefined until an
archive is loaded. If the archive displays characteristics of a
GNU-style archive, GNU is returned. If it looks like a bsd-style
archive, BSD is returned. Otherwise, COMMON is returned. Note that
unless filenames exceed 16 characters in length, bsd archives look like
the common format.
clear
$ar->clear;
Clears the current in-memory archive.
returns the number of files successfully added, or undef on failure.
add_data
my $size = $ar->add_data($filename, $data, $filedata);
Takes an filename and a set of data to represent it. Unlike
Archive::Ar::Libarchive#add_files, Archive::Ar::Libarchive#add_data is
a virtual add, and does not require data on disk to be present. The
data is a hash that looks like:
$filedata = {
uid => $uid, #defaults to zero
gid => $gid, #defaults to zero
date => $date, #date in epoch seconds. Defaults to now.
mode => $mode, #defaults to 0100644;
};
You cannot add_data over another file however. This returns the file
length in bytes if it is successful, undef otherwise.
lib/Archive/Ar/Libarchive.pm view on Meta::CPAN
my $value = $ar->get_opt($name);
Returns the value of the option C<$name>.
=head2 type
my $type = $ar->type;
Returns the type of the ar archive. The type is undefined until an archive
is loaded. If the archive displays characteristics of a GNU-style archive,
GNU is returned. If it looks like a bsd-style archive, BSD is returned.
Otherwise, COMMON is returned. Note that unless filenames exceed 16
characters in length, bsd archives look like the common format.
=head2 clear
$ar->clear;
Clears the current in-memory archive.
=head2 read
lib/Archive/Ar/Libarchive.pm view on Meta::CPAN
returns the number of files successfully added, or C<undef> on failure.
=head2 add_data
my $size = $ar->add_data($filename, $data, $filedata);
Takes an filename and a set of data to represent it. Unlike
L<Archive::Ar::Libarchive#add_files>,
L<Archive::Ar::Libarchive#add_data> is a virtual add, and does not
require data on disk to be present. The data is a hash that looks like:
$filedata = {
uid => $uid, #defaults to zero
gid => $gid, #defaults to zero
date => $date, #date in epoch seconds. Defaults to now.
mode => $mode, #defaults to 0100644;
};
You cannot add_data over another file however. This returns the file
length in bytes if it is successful, C<undef> otherwise.
xs/ppport.h view on Meta::CPAN
}
usage() if $opt{help};
strip() if $opt{strip};
$opt{'compat-version'} = 5.003_07 unless exists $opt{'compat-version'};
$opt{'compat-version'} = int_parse_version($opt{'compat-version'});
my $int_min_perl = int_parse_version(5.003_07);
# Each element of this hash looks something like:
# 'Poison' => {
# 'base' => '5.008000',
# 'provided' => 1,
# 'todo' => '5.003007'
# },
my %API = map { /^(\w+)\|([^|]*)\|([^|]*)\|(\w*)$/
? ( $1 => {
($2 ? ( base => $2 ) : ()),
($3 ? ( todo => $3 ) : ()),
(index($4, 'v') >= 0 ? ( varargs => 1 ) : ()),
xs/ppport.h view on Meta::CPAN
LONGDOUBLE_VAX_ENDIAN|5.025004||Viu
LONGDOUBLE_X86_80_BIT|5.021009||Viu
LONGJMP|5.005000||Viu
longjmp|5.005000||Viu
LONGJMP_t8_p8|5.033003||Viu
LONGJMP_t8_pb|5.033003||Viu
LONGJMP_tb_p8|5.033003||Viu
LONGJMP_tb_pb|5.033003||Viu
LONGLONGSIZE|5.005000|5.005000|Vn
LONGSIZE|5.004000|5.003007|oVn
looks_like_bool|5.027008||Viu
looks_like_number|5.003007|5.003007|
LOOP_PAT_MODS|5.009005||Viu
lop|5.005000||Viu
lossless_NV_to_IV|5.031001||Vniu
LOWEST_ANYOF_HRx_BYTE|5.031002||Viu
L_R_TZSET|5.009005|5.009005|Vn
lseek|5.005000||Viu
LSEEKSIZE|5.006000|5.006000|Vn
lstat|5.005000||Viu
LvFLAGS|5.015006||Viu
LVf_NEG_LEN|5.027001||Viu
xs/ppport.h view on Meta::CPAN
# define D_PPP_TO_FOLD_CALLEE(s,r,l) \
Perl__to_utf8_fold_flags(aTHX_ s, r, l, FOLD_FLAGS_FULL, NULL)
# endif
/* The actual implementation of the backported macros. If too short, croak,
* otherwise call the original that doesn't have an upper limit parameter */
# define D_PPP_GENERIC_MULTI_ARG_TO(name, s, e,r,l) \
(((((e) - (s)) <= 0) \
/* We could just do nothing, but modern perls croak */ \
? (croak("Attempting case change on zero length string"), \
0) /* So looks like it returns something, and will compile */ \
: ((e) - (s)) < UTF8SKIP(s)) \
? (croak(D_PPP_TOO_SHORT_MSG, \
s[0], (int) ((e) - (s)), (int) UTF8SKIP(s)), \
0) \
: D_PPP_TO_ ## name ## _CALLEE(s,r,l))
#ifndef toUPPER_utf8_safe
# define toUPPER_utf8_safe(s,e,r,l) \
D_PPP_GENERIC_MULTI_ARG_TO(UPPER,s,e,r,l)
#endif
xs/ppport.h view on Meta::CPAN
D_PPP_GENERIC_SINGLE_ARG_TO_UVCHR(title, c, s, l)
#endif
#ifndef toFOLD_uvchr
# define toFOLD_uvchr(c, s, l) toLOWER_uvchr(c, s, l)
#endif
# define D_PPP_GENERIC_SINGLE_ARG_TO_UTF8(name, s, e, r, l) \
(((((e) - (s)) <= 0) \
? (croak("Attempting case change on zero length string"), \
0) /* So looks like it returns something, and will compile */ \
: ((e) - (s)) < UTF8SKIP(s)) \
? (croak(D_PPP_TOO_SHORT_MSG, \
s[0], (int) ((e) - (s)), (int) UTF8SKIP(s)), \
0) \
/* Get the changed code point and store its UTF-8 */ \
: D_PPP_UV_TO_UTF8(r, to_utf8_ ## name(s)), \
/* Then store its length, and re-get code point for return */ \
*(l) = UTF8SKIP(r), to_utf8_ ## name(r))
/* Warning: toUPPER_utf8_safe, toLOWER_utf8_safe, toTITLE_utf8_safe,
( run in 0.388 second using v1.01-cache-2.11-cpan-64827b87656 )