661 |
|
|
662 |
package Search::Estraier::Node; |
package Search::Estraier::Node; |
663 |
|
|
664 |
|
use Carp qw/croak/; |
665 |
|
|
666 |
=head1 Search::Estraier::Node |
=head1 Search::Estraier::Node |
667 |
|
|
668 |
=head2 new |
=head2 new |
689 |
$self ? return $self : return undef; |
$self ? return $self : return undef; |
690 |
} |
} |
691 |
|
|
692 |
|
=head2 set_url |
693 |
|
|
694 |
|
Specify URL to node server |
695 |
|
|
696 |
|
$node->set_url('http://localhost:1978'); |
697 |
|
|
698 |
|
=cut |
699 |
|
|
700 |
|
sub set_url { |
701 |
|
my $self = shift; |
702 |
|
$self->{url} = shift; |
703 |
|
} |
704 |
|
|
705 |
|
=head2 set_proxy |
706 |
|
|
707 |
|
Specify proxy server to connect to node server |
708 |
|
|
709 |
|
$node->set_proxy('proxy.example.com', 8080); |
710 |
|
|
711 |
|
=cut |
712 |
|
|
713 |
|
sub set_proxy { |
714 |
|
my $self = shift; |
715 |
|
my ($host,$port) = @_; |
716 |
|
croak "proxy port must be number" unless ($port =~ m/^\d+$/); |
717 |
|
$self->{pxhost} = $host; |
718 |
|
$self->{pxport} = $port; |
719 |
|
} |
720 |
|
|
721 |
package Search::Estraier::Master; |
package Search::Estraier::Master; |
722 |
|
|
723 |
use Carp; |
use Carp; |