Apache2-SSI
view release on metacpan or search on metacpan
lib/Apache2/SSI/Finfo.pm view on Meta::CPAN
if( $r )
{
return( $r->fname );
}
else
{
return( $self->{filepath} );
}
}
sub gid { return( shift->group ); }
sub group
{
my $self = shift( @_ );
my $f = $self->apr_finfo;
if( $f )
{
return( $f->fname );
}
else
lib/Apache2/SSI/Finfo.pm view on Meta::CPAN
{
# Do something
}
print "File path is: ", $finfo->filepath;
if( $finfo->filetype == Apache2::SSI::Finfo::FILETYPE_NOFILE )
{
# File does not exist
}
# Same as $finfo->filepath
print "File path is: ", $finfo->fname;
print "File group id is: ", $finfo->gid;
# Can also use $finfo->group which will yield the same result
$finfo->ino;
# or $finfo->inode;
if( $finfo->is_block )
{
# Do something
}
elsif( $finfo->is_char )
{
# Do something else
lib/Apache2/SSI/Finfo.pm view on Meta::CPAN
Returns the file path as a string. Same as L</fname>
=head2 filetype
Returns the file type which is one of the L</CONSTANTS> below.
=head2 fname
Returns the file path as a string. Same as L</filepath>
=head2 gid
Returns the numeric group ID of file's owner. Same as L</group>
=head2 group
Returns the numeric group ID of file's owner. Same as L</gid>
=for Pod::Coverage ino
=head2 inode
Returns the inode number.
=head2 is_block
Returns true if this is a block file, false otherwise.
lib/Apache2/SSI/SemStat.pod view on Meta::CPAN
=head1 NAME
Apache2::SSI::SemStat - Apache2 SSI Notes Shared Memory Manipulation
=head1 SYNOPSIS
semctl( $id, 0, IPC_STAT, $data ) || die( "$!\n" );
my @values = unpack( $data );
my $semstat => Apache2::SSI::SemStat->new( @values );
my $cgid = $semstat->cgid;
my $ctime = $semstat->ctime;
my $cuid = $semstat->cuid;
my $gid = $semstat->gid;
my $mode = $semstat->mode;
my $nsems = $semstat->nsems;
my $otime = $semstat->otime;
my $uid = $semstat->uid;
=head1 VERSION
v0.1.0
=head1 DESCRIPTION
L<Apache2::SSI::SemStat> provides an object oriented way to access semaphore stat information after being populated during object instantiation.
=head1 METHODS
=head2 new
Creates a new L<Apache2::SSI::SemStat> object and return it.
=head2 cgid
Effective GID of creator
=head2 ctime
Last semop time
=head2 cuid
Effective UID of creator
=head2 gid
Effective UID of owner
=head2 mode
Permissions
=head2 nsems
No. of semaphores in set
lib/Apache2/SSI/SharedMem.pm view on Meta::CPAN
use constant OTIME => 6;
use constant NSEMS => 7;
sub new
{
my $this = shift( @_ );
my @vals = @_;
return( bless( [ @vals ] => ref( $this ) || $this ) );
}
sub cgid { return( shift->[CGID] ); }
sub ctime { return( shift->[CTIME] ); }
sub cuid { return( shift->[CUID] ); }
sub gid { return( shift->[GID] ); }
sub mode { return( shift->[MODE] ); }
sub nsems { return( shift->[NSEMS] ); }
sub otime { return( shift->[OTIME] ); }
sub uid { return( shift->[UID] ); }
}
t/50.finfo.t view on Meta::CPAN
my @finfo = stat( $file );
is( $f->size, $finfo[ FINFO_SIZE ], 'size' );
is( $f->csize, $finfo[ FINFO_SIZE ], 'csize' );
is( $f->device, $finfo[ FINFO_DEV ], 'device' );
is( $f->filetype, Apache2::SSI::Finfo::FILETYPE_REG, 'file type' );
is( $f->fname, $file, 'file name' );
ok( $f->gid == $finfo[ FINFO_GID ], 'gid' );
ok( $f->group == $finfo[ FINFO_GID ], 'group' );
ok( $f->inode == $finfo[ FINFO_INODE ], 'inode' );
ok( $f->mode == ( $finfo[ FINFO_MODE ] & 07777 ), 'mode' );
if( $IS_WINDOWS_OS )
{
is( $f->name, 'include.bat', 'file base name' );
( run in 0.912 second using v1.01-cache-2.11-cpan-5735350b133 )