fix quoting in AsyncWgetFileGetter again
[videosite.git] / videosite / JSArrayParser.pm
1 #
2 # This is a stub class for more complex JS*ArrayParser objects.
3 # It's new() method usually does _not_ return an object of
4 # type videosite::JSArrayParser, but rather a child object of itself
5 # which is able to do some actual work. The only time new() retuns
6 # an videosite::JSArrayParser onject is when no child objects are
7 # available.
8 #
9
10 package videosite::JSArrayParser;
11
12 use strict;
13
14 sub new {
15     my $class = shift;
16     my %params = @_;
17     my $self = {};
18
19     if ($class ne __PACKAGE__) {
20         # We were called from a child object. Return ourselves.
21         return bless($self, $class);
22     }
23
24     # Try to find a child object which is available and return that.
25
26     require videosite::JSJSONArrayParser;
27     return videosite::JSJSONArrayParser->new(%params);
28 }
29
30 sub parse {
31     my $self = shift;
32
33     # No functionality here
34     return undef;
35 }
36
37 1;