| 1 | package Net::Lyskom::Member; | ||||||||||
| 2 | 1 | ▶ | use base qw{Net::Lyskom::Object}; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 3 | 1 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 1 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | |||||||||||
| 6 | 1 | ▶ | use Net::Lyskom::Time; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | |||||||||||
| 8 | =head1 NAME | ||||||||||
| 9 | |||||||||||
| 10 | Net::Lyskom::Member - object holding member information | ||||||||||
| 11 | |||||||||||
| 12 | =head1 SYNOPSIS | ||||||||||
| 13 | |||||||||||
| 14 | print "User was added at ",$obj->added_at->as_string, ".\n"; | ||||||||||
| 15 | |||||||||||
| 16 | =head1 DESCRIPTION | ||||||||||
| 17 | |||||||||||
| 18 | =over | ||||||||||
| 19 | |||||||||||
| 20 | =item ->member() | ||||||||||
| 21 | |||||||||||
| 22 | Person number of member. | ||||||||||
| 23 | |||||||||||
| 24 | =item ->added_by() | ||||||||||
| 25 | |||||||||||
| 26 | Person number of person who added the member. | ||||||||||
| 27 | |||||||||||
| 28 | =item ->added_at() | ||||||||||
| 29 | |||||||||||
| 30 | Timestamp when member was added. | ||||||||||
| 31 | |||||||||||
| 32 | =item ->invitation() | ||||||||||
| 33 | |||||||||||
| 34 | Member is invited. | ||||||||||
| 35 | |||||||||||
| 36 | =item ->passive() | ||||||||||
| 37 | |||||||||||
| 38 | Member is a passive member. | ||||||||||
| 39 | |||||||||||
| 40 | =item ->secret() | ||||||||||
| 41 | |||||||||||
| 42 | Member is a secret member. | ||||||||||
| 43 | |||||||||||
| 44 | =back | ||||||||||
| 45 | |||||||||||
| 46 | =cut | ||||||||||
| 47 | |||||||||||
| 48 | 0 | ▶ | sub new_from_stream { | ||||||||
|
Subroutine
new_from_stream: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||
| 49 | 0 | my $s = {}; | |||||||||
| 50 | 0 | my $class = shift; | |||||||||
| 51 | 0 | my $ref = shift; | |||||||||
| 52 | |||||||||||
| 53 | 0 | ▶ | $class = ref($class) if ref($class); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 54 | 0 | bless $s, $class; | |||||||||
| 55 | |||||||||||
| 56 | 0 | $s->{member} = shift @{$ref}; | |||||||||
| 57 | 0 | $s->{added_by} = shift @{$ref}; | |||||||||
| 58 | 0 | $s->{added_at} = Net::Lyskom::Time->new_from_stream($ref); | |||||||||
| 59 | 0 | my $type = shift @{$ref}; | |||||||||
| 60 | |||||||||||
| 61 | 0 | ($s->{invitation}, $s->{passive}, $s->{secret}) = | |||||||||
| 62 | $type =~ /./g; | ||||||||||
| 63 | |||||||||||
| 64 | 0 | return $s; | |||||||||
| 65 | } | ||||||||||
| 66 | |||||||||||
| 67 | 0 | ▶ | sub member {my $s = shift; return $s->{member}} | ||||||||
|
Subroutine
member: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 68 | 0 | ▶ | sub added_by {my $s = shift; return $s->{added_by}} | ||||||||
|
Subroutine
added_by: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 69 | 0 | ▶ | sub added_at {my $s = shift; return $s->{added_at}} | ||||||||
|
Subroutine
added_at: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 70 | |||||||||||
| 71 | 0 | ▶ | sub invitation {my $s = shift; return $s->{invitation}} | ||||||||
|
Subroutine
invitation: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 72 | 0 | ▶ | sub passive {my $s = shift; return $s->{passive}} | ||||||||
|
Subroutine
passive: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 73 | 0 | ▶ | sub secret {my $s = shift; return $s->{secret}} | ||||||||
|
Subroutine
secret: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 74 | |||||||||||
| 75 | 1 | 1; | |||||||||