Changeset 32412
- Timestamp:
- 04/14/09 23:43:24 (4 years ago)
- Location:
- lang/perl/WWW-Lengthen/trunk
- Files:
-
- 5 modified
-
Changes (modified) (1 diff)
-
lib/WWW/Lengthen.pm (modified) (2 diffs)
-
t_live/basic.t (modified) (2 diffs)
-
t_live/basic_cached.t (modified) (2 diffs)
-
t_live/urllist.pm (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
lang/perl/WWW-Lengthen/trunk/Changes
r12171 r32412 1 1 Revision history for WWW-Lengthen 2 3 0.07 2009/04/14 4 - added is.gd, bit.ly, enabled shorl, and disabled icanhaz, urltea 5 - added several services WWW::Shorten supports, and marked them 6 as dead 2 7 3 8 0.06 2008/05/22 -
lang/perl/WWW-Lengthen/trunk/lib/WWW/Lengthen.pm
r12171 r32412 5 5 use LWP::UserAgent; 6 6 7 our $VERSION = '0.0 6';7 our $VERSION = '0.07'; 8 8 9 9 our %KnownServices = ( 10 '0rz' => qr{^http://0rz\.tw/.+}, 11 haojp => qr{^http://hao\.jp/.+}, 12 Metamark => qr{^http://xrl\.us/.+}, 13 NotLong => qr{^http://[\w\-]+\.notlong\.com/?$}, 14 ShortenURL => qr{^http://www\.shortenurl\.com/.+}, 15 Smallr => qr{^http://smallr\.com/.+}, 16 SnipURL => qr{^http://snipurl\.com/.+}, 17 TinyURL => qr{^http://tinyurl\.com/.+}, 18 urlTea => qr{^http://urltea\.com/.+}, 19 snurl => qr{^http://snurl.com/.+}, 20 icanhaz => qr{^http://icanhaz.com/.+}, 10 '0rz' => qr{^http://0rz\.tw/.+}, 11 haojp => qr{^http://hao\.jp/.+}, 12 Metamark => qr{^http://xrl\.us/.+}, 13 NotLong => qr{^http://[\w\-]+\.notlong\.com/?$}, 14 Smallr => qr{^http://smallr\.com/.+}, 15 SnipURL => qr{^http://snipurl\.com/.+}, 16 TinyURL => qr{^http://tinyurl\.com/.+}, 17 snurl => qr{^http://snurl\.com/.+}, 18 bitly => qr{^http://bit\.ly/.+}, 19 isgd => qr{^http://is\.gd/.+}, 21 20 ); 22 21 23 22 our %ExtraServices = ( 24 OneShortLink => [ qr{^http://1sl\.net/.+}, 'OneShortLink' ], 25 Tinylink => [ qr{^http://tinylink\.com/.+}, 'Tinylink' ], 23 OneShortLink => [ qr{^http://1sl\.net/.+}, 'OneShortLink' ], 24 Tinylink => [ qr{^http://tinylink\.com/.+}, 'Tinylink' ], 25 Shorl => [ qr{^http://shorl\.com/.+}, 'Shorl' ], 26 26 ); 27 27 28 28 # or maybe was down/too heavy when I tested 29 29 our %DeadServices = ( 30 BabyURL => qr{^http://babyurl\.com/.+}, 31 Linkz => qr{^http://lin\.kz/?\?.+}, 32 Shorl => [ qr{^http://shorl\.com/.+}, 'Shorl' ], # too heavy 33 TinyClick => qr{^http://tinyclick\.com/?\?.+}, 34 V3 => qr{^http://\w+\.v3\.net/}, 30 icanhaz => qr{^http://icanhaz\.com/.+}, 31 urlTea => qr{^http://urltea\.com/.+}, 32 BabyURL => qr{^http://babyurl\.com/.+}, 33 Linkz => qr{^http://lin\.kz/?\?.+}, 34 TinyClick => qr{^http://tinyclick\.com/?\?.+}, 35 V3 => qr{^http://\w+\.v3\.net/}, 36 ShortenURL => qr{^http://www\.shortenurl\.com/.+}, 37 URLjr => qr{^http://urljr\.com/.+}, 38 qURL => qr{^http://qurl\.net/.+}, 39 SmLnk => qr{^http://smlnk\.com/.+}, 40 ShortLink => qr{^http://shortlink\.us/.+}, 41 EkDk => qr{^http://add\.redir\.ek\.dk/.+}, 42 MakeAShorterLink => qr{^http://tinyurl\.com/.+}, 43 LinkToolbot => qr{^http://link\.toolbot\.com/.+}, 35 44 ); 36 45 … … 154 163 =item haojp (http://hao.jp/) 155 164 156 =item I CAN HAZ dot COM (http://icanhaz.com/)157 158 165 =item Metamark (http://xrl.us/) 159 166 160 167 =item NotLong (http://notlong.com/) 161 168 169 =item Smallr (http://smallr.com/) 170 171 =item SnipURL (http://snipurl.com/) 172 173 =item TinyURL (http://tinyurl.com/) 174 175 =item Snurl (http://snurl.com/) 176 177 =item bit.ly (http://bit.ly/) 178 179 =item is.gd (http://is.gd/) 180 181 =back 182 183 =head2 Require WWW::Shorten subclasses 184 185 =over 4 186 187 =item OneShortLink (http://1sl.net/) 188 189 =item Shorl (http://shorl.com/) 190 191 =item Tinylink (http://tinylink.com/) 192 193 # Tinylink may not be available now as WWW::Shorten marks this as "dead" 194 195 =back 196 197 =head2 Dead/Down/Too Heavy when I tested 198 199 not tested but probably works with WWW::Shorten subclasses. 200 201 =over 4 202 203 =item I CAN HAZ dot COM (http://icanhaz.com/) (temporarily unavailable?) 204 205 =item urlTea (http://urltea.com/) (temporarily unavailable?) 206 207 =item BabyURL (http://babyurl.com/) 208 209 =item Linkz (http://lin.kz/) 210 211 =item TinyClick (http://tinyclick.com/) 212 213 =item V3 (http://www.v3.net/) 214 162 215 =item ShortenURL (http://www.shortenurl.com/) 163 164 =item Smallr (http://smallr.com/)165 166 =item SnipURL (http://snipurl.com/)167 168 =item TinyURL (http://tinyurl.com/)169 170 =item urlTea (http://urltea.com/)171 172 =item Snurl (http://snurl.com/)173 174 =back175 176 =head2 Require WWW::Shorten subclasses177 178 =over 4179 180 =item OneShortLink (http://1sl.net/)181 182 =item Tinylink (http://tinylink.com/)183 184 =back185 186 =head2 Dead/Down/Too Heavy when I tested187 188 not tested but probably works with WWW::Shorten subclasses.189 190 =over 4191 192 =item BabyURL (http://babyurl.com/)193 194 =item Linkz (http://lin.kz/)195 196 =item Shorl (http://shorl.com/) # was too heavy197 198 =item TinyClick (http://tinyclick.com/)199 200 =item V3 (http://www.v3.net/)201 216 202 217 =back -
lang/perl/WWW-Lengthen/trunk/t_live/basic.t
r7484 r32412 12 12 my $got = $l->try( $short ) || ''; 13 13 ok $got eq $long, "$name: $got"; 14 sleep 1; 14 15 } 15 16 … … 22 23 } 23 24 else { 24 ok $got ne $long, "$name: $got";25 ok $got eq $short, "$name: (ignored)"; 25 26 } 27 sleep 1; 26 28 } -
lang/perl/WWW-Lengthen/trunk/t_live/basic_cached.t
r7484 r32412 14 14 my $got = $l->try( $short ) || ''; 15 15 ok $got eq $long, "$name: $got"; 16 sleep 1; 16 17 } 17 18 … … 20 21 my $got = $l->try( $short ) || ''; 21 22 ok $got eq $long, "$name: $got"; 23 sleep 1; 22 24 } -
lang/perl/WWW-Lengthen/trunk/t_live/urllist.pm
r12171 r32412 4 4 use strict; 5 5 use warnings; 6 use WWW::Lengthen; 6 7 7 my $ex = 'http://example.com/'; 8 my $ex_t = 'http://example.com/test'; 9 10 sub basic_tests {( 11 '0rz' => [ $ex_t => 'http://0rz.tw/443v7' ], 12 Metamark => [ $ex => 'http://xrl.us/bdgj9' ], 13 NotLong => [ $ex => 'http://exampletest.notlong.com' ], 14 ShortenURL => [ $ex_t => 'http://www.shortenurl.com/9ugbj' ], 15 Smallr => [ $ex => 'http://smallr.com/2ne' ], 16 SnipURL => [ $ex => 'http://snipurl.com/1vv5c' ], 17 TinyURL => [ $ex => 'http://tinyurl.com/kotu' ], 18 urlTea => [ $ex => 'http://urltea.com/1y' ], 19 haojp => [ $ex => 'http://hao.jp/hb' ], 20 snurl => [ $ex => 'http://snurl.com/1vv5c' ], 21 icanhaz => [ $ex => 'http://icanhaz.com/example' ], 22 )} 23 24 sub extra_tests {( 8 my $ex = 'http://example.com/'; 9 my $ex_t = 'http://example.com/test'; 10 my %tests = ( 11 '0rz' => [ $ex_t => 'http://0rz.tw/443v7' ], 12 Metamark => [ $ex => 'http://xrl.us/bdgj9' ], 13 NotLong => [ $ex => 'http://exampletest.notlong.com' ], 14 Smallr => [ $ex => 'http://smallr.com/2ne' ], 15 SnipURL => [ $ex => 'http://snipurl.com/1vv5c' ], 16 TinyURL => [ $ex => 'http://tinyurl.com/kotu' ], 17 urlTea => [ $ex => 'http://urltea.com/1y' ], 18 haojp => [ $ex => 'http://hao.jp/hb' ], 19 snurl => [ $ex => 'http://snurl.com/fuz4q' ], 20 icanhaz => [ $ex => 'http://icanhaz.com/example' ], 25 21 OneShortLink => [ $ex => 'http://1sl.net/1239' ], 26 22 Tinylink => [ $ex_t => 'http://tinylink.com/?nlxzHox18M' ], 27 )} 23 Shorl => [ $ex => 'http://shorl.com/fylevihehyra' ], 24 ShortenURL => [ $ex_t => 'http://www.shortenurl.com/9ugbj' ], 25 bitly => [ $ex => 'http://bit.ly/VDcn' ], 26 isgd => [ $ex => 'http://is.gd/1NTB' ], 27 ); 28 29 sub basic_tests { 30 return map { $_ => $tests{$_} } keys %WWW::Lengthen::KnownServices; 31 } 32 33 sub extra_tests { 34 return map { $_ => $tests{$_} } keys %WWW::Lengthen::ExtraServices; 35 } 28 36 29 37 1;
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)