Changeset 12377
- Timestamp:
- 05/26/08 00:59:06 (5 months ago)
- Location:
- lang/perl/WWW-YourFileHost/trunk
- Files:
-
- 3 modified
Legend:
- Unmodified
- Added
- Removed
-
lang/perl/WWW-YourFileHost/trunk/Changes
r10402 r12377 1 1 Revision history for WWW-YourFileHost 2 0.04 MON MAY 26 01:00:00 2008 2 3 0.03 FRI Apr 25 11:13:00 2008 3 4 remove perlcritic test -
lang/perl/WWW-YourFileHost/trunk/lib/WWW/YourFileHost.pm
r12012 r12377 11 11 use HTTP::Cookies; 12 12 13 our $VERSION = '0.0 3';13 our $VERSION = '0.04'; 14 14 15 15 sub new { … … 89 89 =head1 SYNOPSIS 90 90 91 use LWP::UserAgent; 91 92 use WWW::YourFileHost; 92 93 my $url = 94 "http://www.yourfilehost.com/media.php?cat=video&file=hoge.wmv"; 93 my $url = "http://www.yourfilehost.com/media.php?cat=video&file=hoge.wmv"; 94 my $ua = LWP::UserAgent->new( agent => "WWW::YourFileHost" ); 95 $ua->cookie_jar( 96 HTTP::Cookies->new( 97 file => '', 98 autosave => 1, 99 ) 100 ); 95 101 my $yourfilehost = WWW::YourFileHost->new( url => $url ); 96 # or my $yourfilehost = WWW::YourFileHost->new( id => $id );97 102 print $yourfilehost->photo . "\n"; 98 103 print $yourfilehost->video_id . "\n"; -
lang/perl/WWW-YourFileHost/trunk/t/01.t
r10289 r12377 3 3 use strict; 4 4 use warnings; 5 use LWP::UserAgent; 5 6 use WWW::YourFileHost; 6 7 use Test::More tests => 4; 7 8 8 9 my $url = "http://www.yourfilehost.com/media.php?cat=video&file=guns_dont_kill_people.flv"; 10 my $ua = LWP::UserAgent->new( agent => "WWW::YourFileHost" ); 11 $ua->cookie_jar( HTTP::Cookies->new( 12 file => '', 13 autosave => 1, 14 )); 9 15 10 my $res = WWW::YourFileHost->new( url => $url );16 my $res = WWW::YourFileHost->new( url => $url , ua => $ua ); 11 17 isa_ok $res, 'WWW::YourFileHost'; 12 18
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)