summaryrefslogtreecommitdiff
path: root/local/params.pm
blob: 969d0fedbbfb3efccfba9c7f62510b59cd36241d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
package local::params;
require Exporter;
use CGI qw(:standard);
use strict;
use base "Exporter";

sub new
{
  my $invocant = shift;
  my $class = ref($invocant) || $invocant;
  # my $self  = $class->SUPER::new(@_);
  my $self=bless {@_}, $class;
  return $self;
}

sub has_params
{
  my $self=shift;
  return param()?1:0;
}

sub get_as_hash
{
  my $self = shift;
  my %result;
  for my $key (param) {
    $result{$key}=param($key);
  }

  return %result;
}