Skip to content

Commit

Permalink
Release 0.80
Browse files Browse the repository at this point in the history
  • Loading branch information
nigelhorne committed Jan 19, 2024
1 parent 33b1389 commit 0259468
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 12 deletions.
2 changes: 1 addition & 1 deletion Changes
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Revision history for CGI-Info

0.80
0.80 Fri Jan 19 08:05:29 EST 2024
Added documentroot() as a synonym to rootdir()
For compatability with Apache
Allow "use lib CGI::Info::script_dir() . '../lib';"
Expand Down
2 changes: 1 addition & 1 deletion README
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CGI-Info Version 0.79
CGI-Info Version 0.80

INSTALLATION

Expand Down
22 changes: 14 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
-[![Actions Status](https://github.com/nigelhorne/CGI-Info/workflows/.github/workflows/all.yml/badge.svg)](https://github.com/nigelhorne/CGI-Info/actions)
-[![Travis Status](https://travis-ci.org/nigelhorne/CGI-Info.svg?branch=master)](https://travis-ci.org/nigelhorne/CGI-Info)
-[![Appveyor Status](https://ci.appveyor.com/api/projects/status/1t1yhvagx00c2qi8?svg=true)](https://ci.appveyor.com/project/nigelhorne/cgi-info)
-[![Coveralls Status](https://coveralls.io/repos/github/nigelhorne/CGI-Info/badge.svg?branch=master)](https://coveralls.io/github/nigelhorne/CGI-Info?branch=master)
-[![CPAN](https://img.shields.io/cpan/v/CGI-Info.svg)](http://search.cpan.org/~nhorne/CGI-Info/)
-[![Kwalitee](https://cpants.cpanauthors.org/dist/CGI-Info.png)](http://cpants.cpanauthors.org/dist/CGI-Info)
-[![Tweet](https://img.shields.io/twitter/url/http/shields.io.svg?style=social)](https://twitter.com/intent/tweet?text=Information+about+the+CGI+Environment+#perl+#CGI&url=https://github.com/nigelhorne/cgi-info&via=nigelhorne)

# NAME
Expand All @@ -12,7 +10,7 @@ CGI::Info - Information about the CGI environment

# VERSION

Version 0.79
Version 0.80

# SYNOPSIS

Expand Down Expand Up @@ -93,6 +91,9 @@ Returns the file system directory containing the script.

print 'HTML files are normally stored in ', $info->script_dir(), '/', File::Spec->updir(), "\n";

# or
use lib CGI::Info::script_dir() . '../lib';

## host\_name

Return the host-name of the current web server, according to CGI.
Expand Down Expand Up @@ -129,7 +130,8 @@ CGI::Info helps you to test your script prior to deployment on a website:
if it is not in a CGI environment (e.g. the script is being tested from the
command line), the program's command line arguments (a list of key=value pairs)
are used, if there are no command line arguments then they are read from stdin
as a list of key=value lines. Also you can give one of --tablet, --search-engine,
as a list of key=value lines.
Also you can give one of --tablet, --search-engine,
\--mobile and --robot to mimic those agents. For example:

./script.cgi --mobile name=Nigel
Expand Down Expand Up @@ -188,9 +190,9 @@ constructor.
# ...
my $info = CGI::Info->new();
my $allowed = {
'foo' => qr(^\d*$), # foo must be a number, or empty
'bar' => undef,
'xyzzy' => qr(^[\w\s-]+$), # must be alphanumeric
foo => qr/^\d*$/, # foo must be a number, or empty
bar => undef,
xyzzy => qr/^[\w\s-]+$/, # must be alphanumeric
# to prevent XSS, and non-empty
# as a sanity check
};
Expand Down Expand Up @@ -235,7 +237,7 @@ be thrown:

use CGI::Info;
my $allowed = {
'foo' => qr(\d+),
foo => qr/\d+/
};
my $xyzzy = $info->params(allow => $allowed);
my $bar = $info->param('bar'); # Gives an error message
Expand Down Expand Up @@ -304,6 +306,10 @@ This can be run as a class or object method.

Synonym of rootdir(), for compatibility with [CHI](https://metacpan.org/pod/CHI).

## documentroot

Synonym of rootdir(), for compatibility with Apache.

## logdir

Gets and sets the name of a directory that you can use to store logs in.
Expand Down
4 changes: 2 additions & 2 deletions lib/CGI/Info.pm
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ CGI::Info - Information about the CGI environment
=head1 VERSION
Version 0.79
Version 0.80
=cut

our $VERSION = '0.79';
our $VERSION = '0.80';

=head1 SYNOPSIS
Expand Down

0 comments on commit 0259468

Please sign in to comment.