| 1 | package Net::Lyskom::Membership; | ||||||||||
| 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 | 1 | ▶ | use Net::Lyskom::Util qw{:all}; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 8 | |||||||||||
| 9 | =head1 NAME | ||||||||||
| 10 | |||||||||||
| 11 | Net::Lyskom::Membership - conference membership information object | ||||||||||
| 12 | |||||||||||
| 13 | =head1 SYNOPSIS | ||||||||||
| 14 | |||||||||||
| 15 | print "The last text this user read was ", $obj->last_text_read; | ||||||||||
| 16 | |||||||||||
| 17 | =head1 DESCRIPTION | ||||||||||
| 18 | |||||||||||
| 19 | All this object's methods are read-only and take no arguments. For | ||||||||||
| 20 | details on the meaning of the returned information, see the protocol spec. | ||||||||||
| 21 | |||||||||||
| 22 | =head2 Methods | ||||||||||
| 23 | |||||||||||
| 24 | =over | ||||||||||
| 25 | |||||||||||
| 26 | =item ->position() | ||||||||||
| 27 | |||||||||||
| 28 | =item ->last_time_read() | ||||||||||
| 29 | |||||||||||
| 30 | Returns a L<Net::Lyskom::Time> object. | ||||||||||
| 31 | |||||||||||
| 32 | =item ->conference() | ||||||||||
| 33 | |||||||||||
| 34 | =item ->priority() | ||||||||||
| 35 | |||||||||||
| 36 | =item ->last_text_read() | ||||||||||
| 37 | |||||||||||
| 38 | =item ->read_texts() | ||||||||||
| 39 | |||||||||||
| 40 | Returns a list. | ||||||||||
| 41 | |||||||||||
| 42 | =item ->added_by() | ||||||||||
| 43 | |||||||||||
| 44 | =item ->added_at() | ||||||||||
| 45 | |||||||||||
| 46 | Returns a L<Net::Lyskom::Time> object. | ||||||||||
| 47 | |||||||||||
| 48 | =item ->invitation() | ||||||||||
| 49 | |||||||||||
| 50 | =item ->passive() | ||||||||||
| 51 | |||||||||||
| 52 | =item ->secret() | ||||||||||
| 53 | |||||||||||
| 54 | =back | ||||||||||
| 55 | |||||||||||
| 56 | =cut | ||||||||||
| 57 | |||||||||||
| 58 | #' Stupid XEmacs... | ||||||||||
| 59 | |||||||||||
| 60 | 0 | ▶ | sub position {my $s=shift; return $s->{position}} | ||||||||
|
Subroutine
position: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 61 | 0 | ▶ | sub last_time_read {my $s=shift; return $s->{last_time_read}} | ||||||||
|
Subroutine
last_time_read: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 62 | 0 | ▶ | sub conference {my $s=shift; return $s->{conference}} | ||||||||
|
Subroutine
conference: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 63 | 0 | ▶ | sub priority {my $s=shift; return $s->{priority}} | ||||||||
|
Subroutine
priority: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 64 | 0 | ▶ | sub last_text_read {my $s=shift; return $s->{last_text_read}} | ||||||||
|
Subroutine
last_text_read: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 65 | 0 | ▶ | sub read_texts {my $s=shift; return @{$s->{read_texts}}} | ||||||||
|
Subroutine
read_texts: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 66 | 0 | ▶ | sub added_by {my $s=shift; return $s->{added_by}} | ||||||||
|
Subroutine
added_by: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 67 | 0 | ▶ | sub added_at {my $s=shift; return $s->{added_at}} | ||||||||
|
Subroutine
added_at: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 68 | |||||||||||
| 69 | 0 | ▶ | sub invitation {my $s=shift; return $s->{invitation}} | ||||||||
|
Subroutine
invitation: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 70 | 0 | ▶ | sub passive {my $s=shift; return $s->{passive}} | ||||||||
|
Subroutine
passive: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 71 | 0 | ▶ | sub secret {my $s=shift; return $s->{secret}} | ||||||||
|
Subroutine
secret: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 72 | |||||||||||
| 73 | 0 | ▶ | sub new_from_stream { | ||||||||
|
Subroutine
new_from_stream: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||
| 74 | 0 | my $s = {}; | |||||||||
| 75 | 0 | my $class = shift; | |||||||||
| 76 | 0 | my $ref = shift; | |||||||||
| 77 | |||||||||||
| 78 | 0 | ▶ | $class = ref($class) if ref($class); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 79 | 0 | bless $s,$class; | |||||||||
| 80 | |||||||||||
| 81 | 0 | $s->{position} = shift @{$ref}; | |||||||||
| 82 | 0 | $s->{last_time_read} = Net::Lyskom::Time->new_from_stream($ref); | |||||||||
| 83 | 0 | $s->{conference} = shift @{$ref}; | |||||||||
| 84 | 0 | $s->{priority} = shift @{$ref}; | |||||||||
| 85 | 0 | $s->{last_text_read} = shift @{$ref}; | |||||||||
| 86 | 0 | ▶ | $s->{read_texts} = [parse_array_stream(sub{shift @{$_[0]}},$ref)]; | ||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||||||||||
| 87 | 0 | $s->{added_by} = shift @{$ref}; | |||||||||
| 88 | 0 | $s->{added_at} = Net::Lyskom::Time->new_from_stream($ref); | |||||||||
| 89 | 0 | my $type = shift @{$ref}; | |||||||||
| 90 | |||||||||||
| 91 | 0 | ($s->{invitation},$s->{passive},$s->{secret}) = $type =~ /./g; | |||||||||
| 92 | |||||||||||
| 93 | 0 | return $s; | |||||||||
| 94 | } | ||||||||||
| 95 | 1 | 1; | |||||||||