blib/lib/OAuth/Lite2/Model/ServerState.pm

filter: Statementstmt 100% 20 / 20 Branchbran 100% 2 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 5 / 5 Podpod 100% 1 / 1 totaltotal 100% 28 / 28 SCAR 6.9
CC
2
Cov
100%
new
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 2.0
« blib/lib/OAuth/Lite2/Model/AuthInfo.pm ↑ Summary blib/lib/OAuth/Lite2/Server/DataHandler.pm »
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 sub new {
18 3 ▶ my $class = shift;
Subroutine new: called CC=2 SCAR=6.9
Pod documented
19 3 ▶ my @args = @_ == 1 ? %{$_[0]} : @_;
Branch: 1 branch
BranchTrueFalseTotal
@_ == 1 ? : 2 1 3
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;
« blib/lib/OAuth/Lite2/Model/AuthInfo.pm ↑ Summary blib/lib/OAuth/Lite2/Server/DataHandler.pm »