Apache2-WebApp-Extra-Admin

 view release on metacpan or  search on metacpan

usr/share/webapp-toolkit/extra/class/admin.tt  view on Meta::CPAN

    exit;
}

#----------------------------------------------------------------------------+
# _error(\%controller,$title, $value)
#
# Print errors/exceptions and exit.

sub _error {
    my ($self, $c, $title, $value)
      = validate_pos(@_,
          { type => OBJECT },
          { type => OBJECT },
          { type => SCALAR },
          { type => SCALAR }
      );

    $c->request->content_type('text/html');

    $c->template->process(
        'extras/admin/error.tt',

usr/share/webapp-toolkit/extra/class/admin.tt  view on Meta::CPAN

    exit;
}

#----------------------------------------------------------------------------+
# _log_action(\%controller, $value)
#
# Logs the action including HTTP request parameters.

sub _log_action {
    my ($self, $c, $action)
      = validate_pos(@_,
          { type => OBJECT },
          { type => OBJECT },
          { type => SCALAR }
      );

    my $user    = $c->request->user || 'Unknown';
    my $ip_addr = $c->request->connection->remote_ip;
    my $uri     = $c->request->uri;

    my $param = $c->request->param();

usr/share/webapp-toolkit/extra/class/admin.tt  view on Meta::CPAN

    return;
}

#----------------------------------------------------------------------------+
# _gen_results($total, $start, $limit, \%ary_ref)
#
# Generate per-page results.

sub _gen_results {
    my ($self, $total, $start, $limit, $ary_ref)
      = validate_pos(@_,
          { type => OBJECT   },
          { type => SCALAR   },
          { type => SCALAR   },
          { type => SCALAR   },
          { type => ARRAYREF }
      );

    # calculate the total pages
    my $pages = int($total / $limit);

usr/share/webapp-toolkit/extra/class/admin.tt  view on Meta::CPAN

    return { map %$_, grep ref $_ eq 'HASH', @_ };
}

#----------------------------------------------------------------------------+
# _sort_data($key, $order, \%ary_ref)
#
# Return a sorted multi-dimensional array.

sub _sort_data {
    my ($self, $key, $order, $ary_ref)
      = validate_pos(@_,
          { type => OBJECT   },
          { type => SCALAR   },
          { type => SCALAR   },
          { type => ARRAYREF }
      );

    my $alpha = 0;

    for (@$ary_ref) {
        return unless defined $_->{$key};



( run in 0.472 second using v1.01-cache-2.11-cpan-a5abf4f5562 )