X-Git-Url: https://git.camperquake.de/gitweb.cgi?p=videosite.git;a=blobdiff_plain;f=videosite%2FHTTPRPCGetter.pm;fp=videosite%2FHTTPRPCGetter.pm;h=e82e21826e57f0031714a49353553d13488d5229;hp=16ef7268137f9c1fd21b2304964d30390e966983;hb=debab097d66f3bd735e837a146bc81d09e420961;hpb=9bb78db68a79470e45dd6400321e3dd96ffcb20b diff --git a/videosite/HTTPRPCGetter.pm b/videosite/HTTPRPCGetter.pm index 16ef726..e82e218 100644 --- a/videosite/HTTPRPCGetter.pm +++ b/videosite/HTTPRPCGetter.pm @@ -14,15 +14,15 @@ 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 {