line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# -*- cperl -*- |
2
|
|
|
|
|
|
|
# copyright (C) 2005 Topia . all rights reserved. |
3
|
|
|
|
|
|
|
# This is free software; you can redistribute it and/or modify it |
4
|
|
|
|
|
|
|
# under the same terms as Perl itself. |
5
|
|
|
|
|
|
|
# $Id: NewFriendDiary.pm 96 2005-02-04 16:55:48Z topia $ |
6
|
|
|
|
|
|
|
# $URL: file:///usr/minetools/svnroot/mixi/trunk/WWW-Mixi-OO/lib/WWW/Mixi/OO/NewFriendDiary.pm $ |
7
|
|
|
|
|
|
|
package WWW::Mixi::OO::NewFriendDiary; |
8
|
2
|
|
|
2
|
|
13168
|
use strict; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
80
|
|
9
|
2
|
|
|
2
|
|
12
|
use warnings; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
67
|
|
10
|
2
|
|
|
2
|
|
12
|
use base qw(WWW::Mixi::OO::TableHistoryListPage); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
1066
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
=head1 NAME |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
WWW::Mixi::OO::NewFriendDiary - WWW::Mixi::OO's |
15
|
|
|
|
|
|
|
L class |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
=head1 SYNOPSIS |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
my $page = $mixi->page('home'); |
20
|
|
|
|
|
|
|
# fetch first 50 mixi diaries |
21
|
|
|
|
|
|
|
$page->fetch(limit => 50, diary_type => 1); |
22
|
|
|
|
|
|
|
# ... |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
=head1 DESCRIPTION |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
new_friend_diary page handler |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
=head1 METHODS |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
=over 4 |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
=cut |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
=item parse |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
see super class (L). |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
this module handle following params |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
=over 4 |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
=item diary_type |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
0: ALL |
45
|
|
|
|
|
|
|
1: mixi only |
46
|
|
|
|
|
|
|
2: external only |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
=back |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
=cut |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
sub parse { |
53
|
0
|
|
|
0
|
1
|
|
my ($this, %options) = @_; |
54
|
|
|
|
|
|
|
|
55
|
0
|
|
|
|
|
|
my $diary_type = delete $options{diary_type}; |
56
|
0
|
0
|
|
|
|
|
if ($diary_type) { |
57
|
0
|
|
|
|
|
|
$diary_type -= 1; |
58
|
|
|
|
|
|
|
return grep { |
59
|
0
|
0
|
|
|
|
|
if ($diary_type) { |
|
0
|
|
|
|
|
|
|
60
|
0
|
|
|
|
|
|
$_->{link} !~ /[\?&]id=/o |
61
|
|
|
|
|
|
|
} else { |
62
|
0
|
|
|
|
|
|
$_->{link} =~ /[\?&]id=/o |
63
|
|
|
|
|
|
|
} |
64
|
|
|
|
|
|
|
} $this->SUPER::parse(%options); |
65
|
|
|
|
|
|
|
} else { |
66
|
0
|
|
|
|
|
|
return $this->SUPER::parse(%options); |
67
|
|
|
|
|
|
|
} |
68
|
|
|
|
|
|
|
} |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
1; |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
__END__ |