|
Apache::Description - Managing of descriptions in .htaccess |
Apache::Description - Managing of descriptions in .htaccess
use Apache::Description;
my $d = Apache::Description->new(".htaccess");
while ( my ($file, $desc) = $d->next )
{
## is it the last element ?
last unless $file;
print "$file : $desc";
}
use Apache::Description;
my $d = Apache::Description->new(".htaccess");
print while $d->next;
use Apache::Description;
my $d = Apache::Description->new(".htaccess");
if ( $d->ispresent("foo.txt") )
{ print "found\n" }
else
{ print "not found\n" }
use Apache::Description;
my $d = Apache::Description->new(".htaccess");
$d->add("foo.txt", "bar bar");
use Apache::Description;
my $d = Apache::Description->new(".htaccess");
$d->remove("foo.txt");
use Apache::Description;
my $d = Apache::Description->new(".htaccess");
my $href = $d->get("foo.txt");
use Apache::Description;
my $d = Apache::Description->new(".htaccess");
my $href = $d->getall;
## you can access to the description of foo.txt now :
print qq/foo.txt : $href->{"foo.txt"}\n/;
Manage descriptions available in .htaccess with directives like this : AddDescription "my description" "my_filename.txt"
This module give you access to the AddDescription directives in an object oriented way. Thus, you can add, remove or read descriptions.
This method can return an array, or a scalar according to the context of the caller.
@array = ($filename, $description)
$scal = qq/$filename:$description/
None by default.
http://www.madchat.org/ - Website with more than 2000 AddDescription directives.
Nicolas Bareil, <nbareil+cpan@mouarf.org>
Copyright 2003 by Nicolas Bareil
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
|
Apache::Description - Managing of descriptions in .htaccess |