X-Git-Url: https://git.camperquake.de/gitweb.cgi?a=blobdiff_plain;f=videosite%2FHTTPRPCGetter.pm;h=e82e21826e57f0031714a49353553d13488d5229;hb=513fff57bcf5c5724ea25fc69831b97f8f0bc0cc;hp=2b924065c4e251476a5d4943dc1bc9a1db6eb06b;hpb=2044d5ff60e639a2eafbeed3a70224564e94c84c;p=videosite.git diff --git a/videosite/HTTPRPCGetter.pm b/videosite/HTTPRPCGetter.pm index 2b92406..e82e218 100644 --- a/videosite/HTTPRPCGetter.pm +++ b/videosite/HTTPRPCGetter.pm @@ -4,25 +4,25 @@ # A getter which calls a remote URL in order to trigger a # download. -package HTTPRPCGetter; +package videosite::HTTPRPCGetter; -use GetterBase; -@ISA = qw(GetterBase); +use videosite::GetterBase; +@ISA = qw(videosite::GetterBase); use strict; use LWP::Simple qw(!get); sub new { my $class = shift; - my $self = $class->SUPER::new(); - - $self->{'NAME'} = 'HTTPRPCGetter'; - $self->{'_PARAMS'} = {'URL' => ['http://www.example.com/get.pl?type=%s&vid=%s&title=%s&url=%s', "The URL to call in order to trigger a download. This is a string which is passed to a sprintf call later on. The parameters passed to that sprintf call, in order, are:\n- The site the video is from\n- The ID of the video\n- The title of the video\n- The URL of the video file itself\n- The URL of the site the video was taken from\nAll parameters are hexencoded"]}; - - bless($self, $class); - $self->_prepare_parameters(); - - return $self; + my $self = $class->SUPER::new( + NAME => 'HTTPRPCGetter', + _PARAMS => { + URL => ['http://www.example.com/get.pl?type=%s&vid=%s&title=%s&url=%s', "The URL to call in order to trigger a download. This is a string which is passed to a sprintf call later on. The parameters passed to that sprintf call, in order, are:\n- The site the video is from\n- The ID of the video\n- The title of the video\n- The URL of the video file itself\n- The URL of the site the video was taken from\nAll parameters are hexencoded"] + }, + @_, + ); + + return bless($self, $class); } sub get {