git://git.camperquake.de
/
videosite.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
541e213
)
Base: Add simple_get() function
author
Ralf Ertzinger
<ralf@skytale.net>
Sat, 11 Feb 2012 14:37:41 +0000
(15:37 +0100)
committer
Ralf Ertzinger
<ralf@skytale.net>
Sat, 11 Feb 2012 14:37:41 +0000
(15:37 +0100)
videosite/Base.pm
patch
|
blob
|
history
diff --git
a/videosite/Base.pm
b/videosite/Base.pm
index
001ec56
..
b31fcb6
100644
(file)
--- a/
videosite/Base.pm
+++ b/
videosite/Base.pm
@@
-220,6
+220,17
@@
sub ua {
return $ua;
}
+sub simple_get {
+ my $self = shift;
+ my $url = shift;
+ my $ua = shift || $self->ua();
+ my $r;
+
+ $r = $ua->get($url);
+ return $r->decoded_content() if $r->is_success();
+ return undef;
+}
+
sub decode_hexurl {
my $self = shift;
my $d = shift;