| 1 | package BBS::UserInfo; | ||
| 2 | |||
| 3 | 1 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 1 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | |||
| 6 | =head1 NAME | ||
| 7 | |||
| 8 | BBS::UserInfo - Base class of BBS::UserInfo::XXX | ||
| 9 | |||
| 10 | =cut | ||
| 11 | |||
| 12 | 1 | our $VERSION = '0.01'; | |
| 13 | |||
| 14 | =head1 SYNOPSIS | ||
| 15 | |||
| 16 | use BBS::UserInfo; | ||
| 17 | |||
| 18 | my $bot = BBS::UserInfo->new('Ptt', 'server' => 'ptt.cc'); | ||
| 19 | $bot->connect(); | ||
| 20 | my $data = $bot->query('username'); | ||
| 21 | print($data->{'logintimes'}); | ||
| 22 | |||
| 23 | =head1 FUNCTIONS | ||
| 24 | |||
| 25 | =head2 new() | ||
| 26 | |||
| 27 | =cut | ||
| 28 | |||
| 29 | 0 | ▶ | sub new { |
|
Subroutine
new: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 30 | 0 | my ($class, $style, @params) = @_; | |
| 31 | |||
| 32 | 0 | require(sprintf('BBS/UserInfo/%s.pm', $style)); | |
| 33 | 0 | return "BBS::UserInfo::${style}"->new(@params); | |
| 34 | } | ||
| 35 | |||
| 36 | =head1 AUTHOR | ||
| 37 | |||
| 38 | Gea-Suan Lin, C<< <gslin at gslin.org> >> | ||
| 39 | |||
| 40 | =head1 COPYRIGHT & LICENSE | ||
| 41 | |||
| 42 | Copyright 2006 Gea-Suan Lin, all rights reserved. | ||
| 43 | |||
| 44 | This program is free software; you can redistribute it and/or modify it | ||
| 45 | under the same terms as Perl itself. | ||
| 46 | |||
| 47 | =cut | ||
| 48 | |||
| 49 | 1 | 1; # End of BBS::UserInfo | |