Skip to content

Commit

Permalink
Release 0.87
Browse files Browse the repository at this point in the history
  • Loading branch information
nigelhorne committed Dec 18, 2024
1 parent 94305c5 commit 796de8c
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
name: Perl ${{ matrix.perl }} on ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Setup perl
- name: Setup Perl
uses: shogo82148/actions-setup-perl@v1
with:
perl-version: ${{ matrix.perl }}
Expand Down
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.87
0.87 Wed Dec 18 11:06:09 EST 2024
Test warnings()
Allow the logger to be a ref to code
Fix is_mobile() default return code
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.86
CGI-Info Version 0.87

INSTALLATION

Expand Down
16 changes: 13 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ CGI::Info - Information about the CGI environment

# VERSION

Version 0.86
Version 0.87

# SYNOPSIS

Expand Down Expand Up @@ -167,11 +167,13 @@ Expect will be removed in a later version.

Upload\_dir is a string containing a directory where files being uploaded are to
be stored.
It must be a writeable directory in the temporary area.

Takes optional parameter logger, an object which is used for warnings and
traces.
This logger object is an object that understands warn() and trace() messages,
such as a [Log::Log4perl](https://metacpan.org/pod/Log%3A%3ALog4perl) or [Log::Any](https://metacpan.org/pod/Log%3A%3AAny) object.
such as a [Log::Log4perl](https://metacpan.org/pod/Log%3A%3ALog4perl) or [Log::Any](https://metacpan.org/pod/Log%3A%3AAny) object,
or a reference to code.

The allow, expect, logger and upload\_dir arguments can also be passed to the
constructor.
Expand Down Expand Up @@ -399,7 +401,15 @@ otherwise an HTTP error code

## warnings

Returns the warnings that the object has generated
Returns the warnings that the object has generated as a ref to an array of hashes.

my @warnings;
if(my $w = $info->warnings()) {
@warnings = map { $_->{'warning'} } @{$w};
} else {
@warnings = ();
}
print STDERR join(';', @warnings), "\n";

## set\_logger

Expand Down
7 changes: 4 additions & 3 deletions lib/CGI/Info.pm
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ CGI::Info - Information about the CGI environment
=head1 VERSION
Version 0.86
Version 0.87
=cut

our $VERSION = '0.86';
our $VERSION = '0.87';

=head1 SYNOPSIS
Expand Down Expand Up @@ -847,7 +847,8 @@ sub param {
return;
}

# Helper routine to parse the arguments given to a function,
# Helper routine to parse the arguments given to a function.
# Processes arguments passed to methods and ensures they are in a usable format,
# allowing the caller to call the function in anyway that they want
# e.g. foo('bar'), foo(arg => 'bar'), foo({ arg => 'bar' }) all mean the same
# when called _get_params('arg', @_);
Expand Down

0 comments on commit 796de8c

Please sign in to comment.