| 1 | package WWW::Spider::Hooklist; | ||
| 2 | |||
| 3 | =head1 NAME | ||
| 4 | |||
| 5 | WWW::Spider::Hooklist | ||
| 6 | |||
| 7 | =head1 VERSION | ||
| 8 | |||
| 9 | version 0.01_10 | ||
| 10 | |||
| 11 | =head1 SYNOPSIS | ||
| 12 | |||
| 13 | =head1 DESCRIPTION | ||
| 14 | |||
| 15 | =cut | ||
| 16 | |||
| 17 | 1 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 18 | 1 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 19 | |||
| 20 | 0 | ▶ | use threads; |
|
Subroutine
BEGIN: called CC=1 SCAR=2.6
| |||
| 21 | use Thread::Queue::Queueable; | ||
| 22 | use Thread::Resource::RWLock; | ||
| 23 | |||
| 24 | use WWW::Spider; | ||
| 25 | |||
| 26 | use base qw(Thread::Queue::Queueable Thread::Resource::RWLock); | ||
| 27 | |||
| 28 | use vars qw($VERSION); | ||
| 29 | $VERSION='0.01_10'; | ||
| 30 | |||
| 31 | =pod | ||
| 32 | |||
| 33 | =head1 FUNCTIONS | ||
| 34 | |||
| 35 | =item new WWW::Spider::Hooklist(@VALID-NAMES) | ||
| 36 | |||
| 37 | Creates a hooklist that can categorize hooks as anything in the list | ||
| 38 | VALID-NAMES. This list cannot be changed later on. | ||
| 39 | |||
| 40 | =cut | ||
| 41 | |||
| 42 | sub new { | ||
| 43 | my $class=shift; | ||
| 44 | my @names=@_; | ||
| 45 | my %obj : shared=(); | ||
| 46 | my $self=bless \%obj,$class; | ||
| 47 | for my $name(@names) { | ||
| 48 | my @tmp : shared; | ||
| 49 | $self->{$name}=\@tmp; | ||
| 50 | } | ||
| 51 | $self->Thread::Resource::RWLock::adorn(); | ||
| 52 | return $self; | ||
| 53 | } | ||
| 54 | |||
| 55 | sub redeem { | ||
| 56 | my ($class, $self); | ||
| 57 | return bless $self, $class; | ||
| 58 | } | ||
| 59 | |||
| 60 | =pod | ||
| 61 | |||
| 62 | =head1 BUGS AND LIMITATIONS | ||
| 63 | |||
| 64 | =head1 AUTHOR | ||
| 65 | |||
| 66 | C<WWW::Spider::Hooklist> is written and maintained by Scott Lawrence (bytbox@gmail.com) | ||
| 67 | |||
| 68 | =head1 COPYRIGHT AND LICENSE | ||
| 69 | |||
| 70 | Copyright 2009 Scott Lawrence, all rights reserved. | ||
| 71 | |||
| 72 | This program is free software; you can redistribute it and/or modify it | ||
| 73 | under the same terms as Perl itself. | ||
| 74 | |||
| 75 | =cut | ||