Apache2-SSI
view release on metacpan or search on metacpan
If any portion of this section is held invalid or unenforceable under any particular
circumstance, the balance of the section is intended to apply and the section as
a whole is intended to apply in other circumstances.
It is not the purpose of this section to induce you to infringe any patents or other
property right claims or to contest validity of any such claims; this section has
the sole purpose of protecting the integrity of the free software distribution
system, which is implemented by public license practices. Many people have
made generous contributions to the wide range of software distributed through
that system in reliance on consistent application of that system; it is up to the
author/donor to decide if he or she is willing to distribute software through any
other system and a licensee cannot impose that choice.
This section is intended to make thoroughly clear what is believed to be a
consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in certain countries
either by patents or by copyrighted interfaces, the original copyright holder who
places the Program under this License may add an explicit geographical
distribution limitation excluding those countries, so that distribution is permitted
only in or among countries not thus excluded. In such case, this License
lib/Apache2/SSI/File/Type.pm view on Meta::CPAN
This is used to create cache of magic files.
=head2 check( "/etc/apache2/magic" )
Checks the magic file provided and dumps it on the STDERR.
This is equivalent to option C<-c> of L<file(1)>.
=head2 check_magic
Set or gets the boolean value used to decide whether the magic data are checked.
=head2 data( $some_data )
Guess the mime type based upon the data provided with C<$some_data> and returns it.
If C<$some_data> is zero length big, it will return C<application/x-empty>.
Otherwise, it defaults to the value set with L</default_type>, which, by default, is C<text/plain> if L</default_type> is set to a true value or an empty value otherwise.
=head2 default_type
lib/Apache2/SSI/File/Type.pm view on Meta::CPAN
my $m = Apache2::SSI::File::Type->new;
$m->dump;
exit;
# on the command line:
./my_script.pl 2>my_magic
=head2 error_returns_undef
Sets or gets the boolean value to decide whether this module will return a default value (see L</default_type>) or C<undef> when there is an error.
By default this is set to false, and the module will return a default value upon error.
=head2 file( '/some/file/path.txt' )
Provided with a file and this will guess its mim type.
If an error occurs, and if L</error_returns_undef> is set to true, it will return C<x-system/x-error; description>
where description is the description of the error, otherwise it will set an error object with the error string and return C<undef>. See L<Module::Generic/error> for more information about the error object.
( run in 0.229 second using v1.01-cache-2.11-cpan-de7293f3b23 )