pdata.pm 327 Bytes
Newer Older
1 2 3 4 5 6 7 8
package t::pdata;

use strict;
use Mouse;
use Lemonldap::NG::Portal::Main::Constants qw(PE_OK);

extends 'Lemonldap::NG::Portal::Main::Plugin';

Xavier Guimard's avatar
Xavier Guimard committed
9
sub init { 1 }
10 11 12 13

use constant beforeAuth => 'insert';

sub insert {
Xavier Guimard's avatar
Xavier Guimard committed
14
    my ( $self, $req ) = @_;
15 16 17 18 19 20
    $req->pdata->{mytest} ||= 0;
    $req->pdata->{mytest}++;
    return PE_OK;
}

1;