Permalink
Browse files

If URL is no given, fall back to STDIN

  • Loading branch information...
1 parent 5fcda89 commit 0b7c856294a5d20c23f8da0da2eb425cfe92b96d @mizzy committed Jan 10, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 webiblo.pl
View
@@ -18,7 +18,8 @@
{font-size:x-large;}
STYLE
-my $book = JSON::Syck::Load(do { local $/; <STDIN>});
+my $uri = shift;
+my $book = $uri ? JSON::Syck::Load(get($uri)) : JSON::Syck::Load(do { local $/; <STDIN>});
mkdir 'tmp' unless -d 'tmp';
mkdir 'out' unless -d 'out';

0 comments on commit 0b7c856

Please sign in to comment.