| 1 | package OAuth::Lite2::Model::ServerState; | ||||||||||
| 2 | |||||||||||
| 3 | 17 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 17 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | |||||||||||
| 6 | 17 | ▶ | use base 'Class::Accessor::Fast'; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | |||||||||||
| 8 | 17 | __PACKAGE__->mk_accessors(qw( | |||||||||
| 9 | client_id | ||||||||||
| 10 | server_state | ||||||||||
| 11 | expires_in | ||||||||||
| 12 | created_on | ||||||||||
| 13 | )); | ||||||||||
| 14 | |||||||||||
| 15 | 17 | ▶ | use Params::Validate; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 16 | |||||||||||
| 17 | 3 | ▶ | sub new { | ||||||||
|
Subroutine
new: called CC=2 SCAR=6.9
Pod
documented
| |||||||||||
| 18 | 3 | my $class = shift; | |||||||||
| 19 | 3 | ▶ | my @args = @_ == 1 ? %{$_[0]} : @_; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 20 | 3 | my %params = Params::Validate::validate_with( | |||||||||
| 21 | params => \@args, | ||||||||||
| 22 | spec => { | ||||||||||
| 23 | client_id => 1, | ||||||||||
| 24 | server_state => 1, | ||||||||||
| 25 | expires_in => 1, | ||||||||||
| 26 | created_on => { optional => 1 }, | ||||||||||
| 27 | }, | ||||||||||
| 28 | allow_extra => 1, | ||||||||||
| 29 | ); | ||||||||||
| 30 | 3 | my $self = bless \%params, $class; | |||||||||
| 31 | 3 | return $self; | |||||||||
| 32 | } | ||||||||||
| 33 | |||||||||||
| 34 | =head1 NAME | ||||||||||
| 35 | |||||||||||
| 36 | OAuth::Lite2::Model::ServerState - model class that represents Server State | ||||||||||
| 37 | |||||||||||
| 38 | =head1 ACCESSORS | ||||||||||
| 39 | |||||||||||
| 40 | =head2 client_id | ||||||||||
| 41 | |||||||||||
| 42 | Client Identifier | ||||||||||
| 43 | |||||||||||
| 44 | =head2 server_state | ||||||||||
| 45 | |||||||||||
| 46 | Server State string. | ||||||||||
| 47 | |||||||||||
| 48 | =head2 expires_in | ||||||||||
| 49 | |||||||||||
| 50 | Seconds to expires from 'created_on' | ||||||||||
| 51 | |||||||||||
| 52 | =head2 created_on | ||||||||||
| 53 | |||||||||||
| 54 | UNIX time when Server State created. | ||||||||||
| 55 | |||||||||||
| 56 | =head1 AUTHOR | ||||||||||
| 57 | |||||||||||
| 58 | Ryo Ito, E<lt>ritou.06@gmail.comE<gt> | ||||||||||
| 59 | |||||||||||
| 60 | Lyo Kato, E<lt>lyo.kato@gmail.comE<gt> | ||||||||||
| 61 | |||||||||||
| 62 | =head1 COPYRIGHT AND LICENSE | ||||||||||
| 63 | |||||||||||
| 64 | Copyright (C) 2010 by Lyo Kato | ||||||||||
| 65 | |||||||||||
| 66 | This library is free software; you can redistribute it and/or modify | ||||||||||
| 67 | it under the same terms as Perl itself, either Perl version 5.8.8 or, | ||||||||||
| 68 | at your option, any later version of Perl 5 you may have available. | ||||||||||
| 69 | |||||||||||
| 70 | =cut | ||||||||||
| 71 | |||||||||||
| 72 | 17 | 1; | |||||||||