Permalink
Browse files

Merge pull request #35 from kimmel/master

attempt 2
  • Loading branch information...
2 parents 0ef7df2 + 22cf7f1 commit b14a137d32edda1fe6a1ef1f80a16d94b23de654 @matthewbauer matthewbauer committed Dec 18, 2011
Showing with 40 additions and 18 deletions.
  1. +3 −6 get_flash_videos
  2. +37 −0 t/00_load.t
  3. +0 −12 t/load.t
View
9 get_flash_videos
@@ -47,10 +47,7 @@ use FlashVideo::VideoPreferences;
unshift @INC, \&plugin_loader;
-our $VERSION;
-BEGIN {
- $VERSION = "1.25";
-}
+our $VERSION = "1.25";
our %opt;
BEGIN {
@@ -181,8 +178,8 @@ if($^O =~ /MSWin/i) {
binmode STDOUT, ":encoding(" . get_win_codepage() . ")";
} else {
$opt{filename} = Encode::decode("utf-8", $opt{filename});
- binmode STDERR, ":utf8";
- binmode STDOUT, ":utf8";
+ binmode STDERR, '<:encoding(UTF-8)';
+ binmode STDOUT, '<:encoding(UTF-8)';
}
my (@urls) = @ARGV;
View
37 t/00_load.t
@@ -0,0 +1,37 @@
+#!perl
+
+use warnings;
+use strict;
+use Test::More tests => 20;
+
+BEGIN {
+ chdir 't' if -d 't';
+ push @INC, '../lib';
+
+ my @classes = qw(
+ Compress::Zlib
+ FlashVideo::Downloader
+ FlashVideo::Generic
+ FlashVideo::Mechanize
+ FlashVideo::RTMPDownloader
+ FlashVideo::Search
+ FlashVideo::Site
+ FlashVideo::URLFinder
+ FlashVideo::Utils
+ FlashVideo::VideoPreferences
+ HTML::Entities
+ HTML::TokeParser
+ HTTP::Config
+ HTTP::Cookies
+ HTTP::Request::Common
+ LWP::Protocol::http
+ Tie::IxHash
+ URI
+ WWW::Mechanize
+ XML::Simple
+ );
+
+ foreach my $class (@classes) {
+ use_ok $class or BAIL_OUT("Could not load $class");
+ }
+}
View
12 t/load.t
@@ -1,12 +0,0 @@
-#!perl
-use lib "..";
-use Test::More tests => 8;
-
-use_ok "FlashVideo::Utils";
-use_ok "FlashVideo::Mechanize";
-use_ok "FlashVideo::URLFinder";
-use_ok "FlashVideo::Downloader";
-use_ok "FlashVideo::Generic";
-use_ok "FlashVideo::RTMPDownloader";
-use_ok "FlashVideo::Search";
-use_ok "FlashVideo::VideoPreferences";

0 comments on commit b14a137

Please sign in to comment.