WWW-Shorten-3.04000755001750001750 012205364257 13527 5ustar00dcrossdcross000000000000WWW-Shorten-3.04/INSTALL000444001750001750 700612205364257 14720 0ustar00dcrossdcross000000000000Installation Instructions The instructions are basically as per any Perl module. INSTALLING AUTOMATICALLY ------------------------ The easiest way to install is via CPAN or CPANPLUS: CPAN: % perl -MCPAN -e shell [as root] > install WWW::Shorten > quit CPANPLUS: % cpanp > i WWW::Shorten > q See your local 'perldoc CPAN' or 'perldoc CPANPLUS' for instructions on setting up and configuring CPAN or CPANPLUS. OBTAINING THE MODULE -------------------- The latest release version of WWW::Shorten can be downloaded from any CPAN site: http://www.cpan.org/modules/by-authors/id/S/SP/SPOON/ http://search.cpan.org/dist/WWW-Shorten/ Interim and development versions may also be available from the author's web site: http://dellah.org/perl/ WWW::Shorten is distributed as a gzipped tar archive file: WWW-Shorten-.tar.gz where represents the current version number, e.g. 1.88. To install the module, unpack the distribution archive to create an installation directory. Something like this: tar zxf WWW-Shorten-1.88.tar.gz or gunzip WWW-Shorten-1.88.tar.gz tar xf WWW-Shorten-1.88.tar You can then 'cd' into the directory created, cd WWW-Shorten-1.88 INSTALLING MANUALLY ------------------- First, verify the package's integrity by ensuring you have Module::Signature installed, then type: % cpansign -v That will check each file's integrity, as well as the signature's validity, thus verifying the integrity of the entire package. If "==> Signature verified OK! <==" is not displayed, the distribution may already have been compromised, and you should not run its Makefile.PL. Ideally, you should confirm with a third party that the finger print and key id by which the signature was signed is indeed the key it is meant to be (ideally you'll have an appropriate web of trust set up, but that's not always possible). The 'make install' (done later) will install the modules and scripts on your system. You may need administrator privileges to perform this task. Alternately you can install the module to a local directory (see ExtUtils::MakeMaker for full details), e.g. % perl Makefile.PL PREFIX=/home/abw/ Don't forget to update your PERL5LIB environment variable if you do this, or add a line to your script to tell Perl where to find the files, e.g. use lib qw( /home/abw/lib/perl5/site_perl/5.6.0 ); If you're not after a custom location, just do: % perl Makefile.PL If you are lacking any of the prerequisite modules, running that program will tell you. All prerequisites are available from CPAN. When you have them all: % make && make test If there are any failures, it's best if you contact me. It may help other people who have the same problem. I don't tend to read the Perl newsgroups or PerlMonks, so it's no use posting there. When you report your trouble, be sure to send me the following information; + result of `perl -V' + output from 'make test' - ideally do 'make test TEST_VERBOSE=1 >& errs' Send those to bug-WWW-Shorten@rt.cpan.org and I'll get back to you as soon as I'm able. If it worked, then become root and type: # make install Congratulations. You've just installed WWW::Shorten. If you have a copy of cpantest installed, type: % cpantest -g pass -nc -p `basename \`pwd\`` -auto Or: % cpantest -g pass -nc -p WWW-Shorten-1.88 -auto That will tell both me and other potential users that the module built correctly on your machine. cheers, Iain (aka Spoon). http://iain.truskett.id.au/ WWW-Shorten-3.04/META.yml000444001750001750 255212205364257 15141 0ustar00dcrossdcross000000000000--- abstract: 'Interface to URL shortening sites.' author: - 'Original Iain Truskett ' - 'Based on WWW::MakeAShorterLink by Dave Cross ' build_requires: Test::More: 0.47 configure_requires: Module::Build: 0.40 dynamic_config: 1 generated_by: 'Module::Build version 0.4005, CPAN::Meta::Converter version 2.130880' license: artistic_2 meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html version: 1.4 name: WWW-Shorten provides: WWW::Shorten: file: lib/WWW/Shorten.pm version: 3.04 WWW::Shorten::LinkToolbot: file: lib/WWW/Shorten/LinkToolbot.pm version: 1.90 WWW::Shorten::Linkz: file: lib/WWW/Shorten/Linkz.pm version: 1.90 WWW::Shorten::MakeAShorterLink: file: lib/WWW/Shorten/MakeAShorterLink.pm version: 1.90 WWW::Shorten::Metamark: file: lib/WWW/Shorten/Metamark.pm version: 1.91 WWW::Shorten::TinyClick: file: lib/WWW/Shorten/TinyClick.pm version: 1.90 WWW::Shorten::TinyURL: file: lib/WWW/Shorten/TinyURL.pm version: 1.90 WWW::Shorten::UserAgent: file: lib/WWW/Shorten/UserAgent.pm WWW::Shorten::generic: file: lib/WWW/Shorten/generic.pm version: 1.92 requires: Config::Auto: 0 LWP: 5.75 LWP::UserAgent: 2.023 URI: 1.27 perl: 5.006 resources: license: http://www.perlfoundation.org/artistic_license_2_0 version: 3.04 WWW-Shorten-3.04/ChangeLog.SPOON000444001750001750 10565512205364257 16407 0ustar00dcrossdcross000000000000This file contains a list of all of the changes by Iain Truskett (SPOON) ____________________________________________________________________________ [ 301] By: iain on 2003/11/13 10:02:23 Log: - 1.88 ! main/Changes main/lib/WWW/Shorten.pm ____________________________________________________________________________ [ 300] By: iain on 2003/11/13 10:02:08 Log: - Tidied up return values and authorship. ! main/lib/WWW/Shorten/OneShortLink.pm ____________________________________________________________________________ [ 299] By: iain on 2003/11/13 09:47:04 Log: - EkDk service removed. - ShortLink service removed. - qURL service removed. ! main/lib/WWW/Shorten/EkDk.pm main/lib/WWW/Shorten/ShortLink.pm ! main/lib/WWW/Shorten/qURL.pm main/t/ekdk.t main/t/qurl.t ! main/t/shortlink.t ____________________________________________________________________________ [ 298] By: iain on 2003/11/12 23:01:01 Log: - Upped TinyClick.pm's version. ! main/lib/WWW/Shorten/TinyClick.pm ____________________________________________________________________________ [ 297] By: iain on 2003/11/12 23:00:13 Log: - TinyClick made their URLs slightly harder to find. ! main/lib/WWW/Shorten/TinyClick.pm ____________________________________________________________________________ [ 296] By: iain on 2003/11/12 22:59:05 Log: - Metamark tests tidied. ! main/t/metamark.t ____________________________________________________________________________ [ 295] By: iain on 2003/11/12 22:58:37 Log: - Notlong tests tidied. ! main/t/notlong.t ____________________________________________________________________________ [ 294] By: iain on 2003/11/12 22:58:00 Log: - Added OneShortLink, http://1sl.net/ + main/lib/WWW/Shorten/OneShortLink.pm main/t/oneshort.t ____________________________________________________________________________ [ 293] By: iain on 2003/11/12 22:56:52 Log: - Shorl test precedence fixed. ! main/t/shorl.t ____________________________________________________________________________ [ 292] By: iain on 2003/11/12 22:55:48 Log: - SmLnk ID scheme has changed. ! main/t/smlnk.t ____________________________________________________________________________ [ 291] By: iain on 2003/09/10 11:51:30 Log: - Mention CGI::Shorten ! main/Changes ____________________________________________________________________________ [ 290] By: iain on 2003/09/10 11:50:20 Log: - Mention CGI::Shorten ! main/lib/WWW/Shorten.pm ____________________________________________________________________________ [ 289] By: iain on 2003/09/08 11:03:28 Log: - Skip the right modules in the subclass list. ! main/lib/WWW/Shorten.pm ____________________________________________________________________________ [ 288] By: iain on 2003/09/08 00:43:04 Log: - Added links to search.cpan.org and backpan. - Add 1.88 ! main/Changes ____________________________________________________________________________ [ 287] By: iain on 2003/09/08 00:42:31 Log: - Use Class::Factory::Util to provide randomised selection. ! main/lib/WWW/Shorten.pm ____________________________________________________________________________ [ 286] By: iain on 2003/09/08 00:05:34 Log: - Better abstract. ! main/lib/WWW/Shorten.pm ____________________________________________________________________________ [ 285] By: iain on 2003/09/08 00:01:07 Log: - Added lin.kz + main/lib/WWW/Shorten/Linkz.pm main/t/linkz.t ! main/Changes main/lib/WWW/Shorten.pm ____________________________________________________________________________ [ 284] By: iain on 2003/09/02 16:40:57 Log: - 1.86 ! main/Changes ____________________________________________________________________________ [ 283] By: iain on 2003/09/02 16:29:05 Log: - Added URLjr.com + main/lib/WWW/Shorten/URLjr.pm main/t/urljr.t ! main/lib/WWW/Shorten.pm ____________________________________________________________________________ [ 282] By: iain on 2003/09/02 16:28:16 Log: - Fixed wrong URL in docs. - Removed trailing slash in deparse URL. ! main/lib/WWW/Shorten/BabyURL.pm ____________________________________________________________________________ [ 281] By: iain on 2003/09/02 16:19:07 Log: - Added BabyURL.com + main/lib/WWW/Shorten/BabyURL.pm main/t/babyurl.t ! main/lib/WWW/Shorten.pm ____________________________________________________________________________ [ 280] By: iain on 2003/09/02 15:53:48 Log: - Fixed Eric's email. ! main/lib/WWW/Shorten.pm ____________________________________________________________________________ [ 279] By: iain on 2003/08/31 01:31:54 Log: - Licence = noun. License = verb. ! main/lib/WWW/Shorten.pm main/lib/WWW/Shorten/EkDk.pm ! main/lib/WWW/Shorten/MakeAShorterLink.pm ! main/lib/WWW/Shorten/Metamark.pm ! main/lib/WWW/Shorten/NotLong.pm main/lib/WWW/Shorten/Shorl.pm ! main/lib/WWW/Shorten/ShortLink.pm ! main/lib/WWW/Shorten/SmLnk.pm main/lib/WWW/Shorten/SnipURL.pm ! main/lib/WWW/Shorten/TinyClick.pm ! main/lib/WWW/Shorten/TinyURL.pm ! main/lib/WWW/Shorten/Tinylink.pm main/lib/WWW/Shorten/V3.pm ! main/lib/WWW/Shorten/generic.pm main/lib/WWW/Shorten/qURL.pm ____________________________________________________________________________ [ 278] By: iain on 2003/08/31 01:28:42 Log: - Licence = noun. License = verb. ! main/lib/WWW/Shorten.pm ____________________________________________________________________________ [ 277] By: iain on 2003/08/30 01:07:04 Log: - 1.85 ! main/Changes ____________________________________________________________________________ [ 276] By: iain on 2003/08/30 01:06:53 Log: - Assorted documentation nit fixing. ! main/lib/WWW/Shorten.pm main/lib/WWW/Shorten/EkDk.pm ! main/lib/WWW/Shorten/MakeAShorterLink.pm ! main/lib/WWW/Shorten/Metamark.pm ! main/lib/WWW/Shorten/NotLong.pm main/lib/WWW/Shorten/Shorl.pm ! main/lib/WWW/Shorten/ShortLink.pm ! main/lib/WWW/Shorten/SmLnk.pm main/lib/WWW/Shorten/SnipURL.pm ! main/lib/WWW/Shorten/TinyClick.pm ! main/lib/WWW/Shorten/TinyURL.pm ! main/lib/WWW/Shorten/Tinylink.pm main/lib/WWW/Shorten/V3.pm ! main/lib/WWW/Shorten/generic.pm main/lib/WWW/Shorten/qURL.pm ____________________________________________________________________________ [ 275] By: iain on 2003/08/29 17:59:40 Log: - Added v3.net + main/lib/WWW/Shorten/V3.pm main/t/v3.t ! main/lib/WWW/Shorten.pm ____________________________________________________________________________ [ 274] By: iain on 2003/08/29 17:15:00 Log: - Fixed qURL documentation. ! main/lib/WWW/Shorten/qURL.pm ____________________________________________________________________________ [ 273] By: iain on 2003/08/29 17:14:41 Log: - Added TinyLink.com support. + main/lib/WWW/Shorten/Tinylink.pm main/t/tinylink.t ! main/lib/WWW/Shorten.pm ____________________________________________________________________________ [ 272] By: iain on 2003/08/29 17:14:19 Log: - SmLnk.pm now uses the SmLnk API. ! main/lib/WWW/Shorten/SmLnk.pm main/t/smlnk.t ____________________________________________________________________________ [ 271] By: iain on 2003/08/27 12:33:09 Log: - Changed URL for shorlfilter. ! main/Changes main/lib/WWW/Shorten.pm ____________________________________________________________________________ [ 270] By: iain on 2003/08/26 23:25:53 Log: - Added qurl.net - Mentioned shorlfilter. + main/lib/WWW/Shorten/qURL.pm main/t/qurl.t ! main/Changes main/lib/WWW/Shorten.pm ____________________________________________________________________________ [ 265] By: iain on 2003/07/23 12:13:49 Log: - Added ShortLink.us + main/lib/WWW/Shorten/ShortLink.pm main/t/shortlink.t ! main/Changes main/lib/WWW/Shorten.pm ____________________________________________________________________________ [ 264] By: iain on 2003/07/23 11:36:59 Log: - Unified version numbers ! main/Changes main/lib/WWW/Shorten.pm ! main/lib/WWW/Shorten/EkDk.pm ! main/lib/WWW/Shorten/MakeAShorterLink.pm ! main/lib/WWW/Shorten/Metamark.pm ! main/lib/WWW/Shorten/NotLong.pm main/lib/WWW/Shorten/Shorl.pm ! main/lib/WWW/Shorten/SmLnk.pm main/lib/WWW/Shorten/SnipURL.pm ! main/lib/WWW/Shorten/TinyClick.pm ! main/lib/WWW/Shorten/TinyURL.pm ! main/lib/WWW/Shorten/generic.pm ____________________________________________________________________________ [ 263] By: iain on 2003/07/23 11:31:02 Log: - Redundant. - main/t/00checkyaml.t ____________________________________________________________________________ [ 262] By: iain on 2003/07/23 11:30:34 Log: - Autogen - main/t/00signature.t ____________________________________________________________________________ [ 261] By: iain on 2003/07/23 11:19:36 Log: - Autogen. - main/AUTHORS main/MANIFEST main/MANIFEST.SKIP main/Makefile.PL - main/t/00pod.t ____________________________________________________________________________ [ 260] By: iain on 2003/07/23 11:19:24 Log: - Now in RT.cpan.org - main/TODO ____________________________________________________________________________ [ 258] By: iain on 2003/07/23 11:12:01 Log: - Minor test nits fixed. ! main/Changes main/t/notlong.t main/t/snipurl.t ____________________________________________________________________________ [ 257] By: iain on 2003/07/23 11:10:44 Log: - QuickOnes.org doesn't exist any more. - main/lib/WWW/Shorten/QuickOnes.pm main/t/quickones.t ! main/Changes main/lib/WWW/Shorten.pm ____________________________________________________________________________ [ 256] By: iain on 2003/07/17 10:18:31 Log: - Removing Fcol.org support. - main/lib/WWW/Shorten/Fcol.pm main/t/fcol.t ! main/Changes main/MANIFEST main/lib/WWW/Shorten.pm ! main/t/00pod.t ____________________________________________________________________________ [ 246] By: iain on 2003/03/11 19:16:03 Log: - 1.5.8 ! main/Build.PL main/Changes ____________________________________________________________________________ [ 245] By: iain on 2003/03/11 19:06:15 Log: - MANIFEST update. ! main/MANIFEST ____________________________________________________________________________ [ 244] By: iain on 2003/03/11 19:04:34 Log: - Sample configuration file for shorten script added. + main/bin/shortenrc ____________________________________________________________________________ [ 243] By: iain on 2003/03/11 19:03:06 Log: - shorten script souped up. Can now be configured. ! main/bin/shorten ____________________________________________________________________________ [ 242] By: iain on 2003/03/11 18:40:29 Log: - Updated all BUG sections. ! main/lib/WWW/Shorten.pm main/lib/WWW/Shorten/EkDk.pm ! main/lib/WWW/Shorten/Fcol.pm ! main/lib/WWW/Shorten/MakeAShorterLink.pm ! main/lib/WWW/Shorten/Metamark.pm ! main/lib/WWW/Shorten/NotLong.pm ! main/lib/WWW/Shorten/QuickOnes.pm ! main/lib/WWW/Shorten/Shorl.pm main/lib/WWW/Shorten/SmLnk.pm ! main/lib/WWW/Shorten/SnipURL.pm ! main/lib/WWW/Shorten/TinyClick.pm ! main/lib/WWW/Shorten/TinyURL.pm ! main/lib/WWW/Shorten/generic.pm ____________________________________________________________________________ [ 236] By: iain on 2003/03/10 00:48:52 Log: - 1.5.7 ! main/Build.PL main/Changes ____________________________________________________________________________ [ 235] By: iain on 2003/03/10 00:45:35 Log: - Improved MASL tests. ! main/t/masl.t ____________________________________________________________________________ [ 232] By: iain on 2003/03/07 13:35:14 Log: - Added link to NotLong's comparison page to WWW::Shorten. - Revised BUGS section of WWW::Shorten. Others will be done. ! main/lib/WWW/Shorten.pm ____________________________________________________________________________ [ 231] By: iain on 2003/03/07 13:25:40 Log: - MakeAShorterLink.pm has minor POD fixups. - MASL now returns the original URL if it was too short. ! main/lib/WWW/Shorten/MakeAShorterLink.pm ____________________________________________________________________________ [ 230] By: iain on 2003/03/07 13:24:43 Log: - |> Modules return undef with any error. Previously they'd returned an empty string for some errors. ! main/lib/WWW/Shorten/EkDk.pm main/lib/WWW/Shorten/Fcol.pm ! main/lib/WWW/Shorten/NotLong.pm ! main/lib/WWW/Shorten/QuickOnes.pm ! main/lib/WWW/Shorten/Shorl.pm main/lib/WWW/Shorten/SmLnk.pm ! main/lib/WWW/Shorten/TinyClick.pm ! main/lib/WWW/Shorten/TinyURL.pm ____________________________________________________________________________ [ 229] By: iain on 2003/03/05 12:24:10 Log: - 1.5.6 ! main/Build.PL main/Changes ____________________________________________________________________________ [ 228] By: iain on 2003/03/05 12:23:45 Log: - Added SERVICES section to pod, listing services' URLs. ! main/lib/WWW/Shorten.pm ____________________________________________________________________________ [ 227] By: iain on 2003/03/05 12:19:40 Log: - Not interested in urllog ! main/TODO ____________________________________________________________________________ [ 226] By: iain on 2003/03/05 11:59:24 Log: - Added Test::Pod + main/t/00pod.t ! main/MANIFEST ____________________________________________________________________________ [ 225] By: iain on 2003/03/05 11:18:50 Log: - Remove redundant tests. - main/t/ws_newnames.t main/t/ws_notlong.t main/t/ws_quickones.t - main/t/ws_shorl.t main/t/ws_smlnk.t main/t/ws_snipurl.t - main/t/ws_tinyurl.t ! main/MANIFEST ____________________________________________________________________________ [ 224] By: iain on 2003/03/05 11:17:14 Log: - Added TinyClick.com + main/lib/WWW/Shorten/TinyClick.pm main/t/tinyclick.t ! main/MANIFEST main/lib/WWW/Shorten.pm ____________________________________________________________________________ [ 216] By: iain on 2003/02/22 14:17:53 Log: - 1.5.6 changes ! main/Changes ____________________________________________________________________________ [ 214] By: iain on 2003/01/08 01:53:12 Log: - bin/shorten wasn't in the manifest, thus not in the dist. ! main/MANIFEST ____________________________________________________________________________ [ 213] By: iain on 2003/01/08 01:39:30 Log: - 1.5.5 ! main/Build.PL main/Changes ____________________________________________________________________________ [ 212] By: iain on 2003/01/08 01:39:10 Log: - Corrected Metamark doco. - Metamark uses POST rather than GET now. - Ask mentioned in various bits. ! main/AUTHORS main/lib/WWW/Shorten.pm ! main/lib/WWW/Shorten/Metamark.pm ____________________________________________________________________________ [ 211] By: iain on 2003/01/07 14:47:14 Log: - 1.5.4 ! main/Build.PL main/Changes ____________________________________________________________________________ [ 210] By: iain on 2003/01/07 14:46:34 Log: - Added Metamark and 'shorten' to the docs. ! main/lib/WWW/Shorten.pm ____________________________________________________________________________ [ 209] By: iain on 2003/01/07 14:39:36 Log: - Added 'shorten'. A useful little program. + main/bin/shorten ____________________________________________________________________________ [ 208] By: iain on 2003/01/07 14:37:02 Log: - Makefile.PL updated with new recommended stub. ! main/Makefile.PL ____________________________________________________________________________ [ 207] By: iain on 2003/01/07 14:27:10 Log: - SnipURL.com modified their API. Code updated. ! main/lib/WWW/Shorten/SnipURL.pm main/t/snipurl.t ! main/t/ws_snipurl.t ____________________________________________________________________________ [ 206] By: iain on 2003/01/07 13:58:03 Log: - Smlnk test added to depot. + main/t/ws_smlnk.t ____________________________________________________________________________ [ 205] By: iain on 2003/01/07 13:57:39 Log: - Module::Build uses META.yml now rather than .yaml ! main/MANIFEST main/t/00checkyaml.t ____________________________________________________________________________ [ 204] By: iain on 2003/01/07 13:57:03 Log: - Added Ask's Metamark service. + main/lib/WWW/Shorten/Metamark.pm main/t/metamark.t ! main/MANIFEST ____________________________________________________________________________ [ 148] By: iain on 2002/12/02 10:31:39 Log: 1.5.3 changes. ! main/Build.PL main/Changes ____________________________________________________________________________ [ 147] By: iain on 2002/12/02 10:31:25 Log: - Changes updated. ! main/TODO ____________________________________________________________________________ [ 48] By: iain on 2002/11/05 12:18:06 Log: - AUTHORS list added. Have to automate it at some point. - ChangeLog added (genlog of the p4 logs). + main/AUTHORS ! main/MANIFEST ____________________________________________________________________________ [ 47] By: iain on 2002/11/04 13:26:07 Log: - Just reformatting. ! main/TODO ____________________________________________________________________________ [ 46] By: iain on 2002/11/04 13:06:47 Log: - Tests no longer use a dave.org URL. - Uses one of mine instead ( perl.dellah.org ). ! main/t/fcol.t main/t/masl.t main/t/notlong.t ! main/t/quickones.t main/t/shorl.t main/t/snipurl.t ! main/t/tinyurl.t main/t/ws_masl.t main/t/ws_notlong.t ! main/t/ws_quickones.t main/t/ws_shorl.t main/t/ws_snipurl.t ! main/t/ws_tinyurl.t ____________________________________________________________________________ [ 43] By: iain on 2002/11/01 13:24:59 Log: - Continuing 1.5.2. - Added SmLnk.com - Updated Shorten.pm to mention the EdDk, Fcol and SmLnk. + main/lib/WWW/Shorten/SmLnk.pm main/t/smlnk.t ! main/Changes main/MANIFEST main/lib/WWW/Shorten.pm ____________________________________________________________________________ [ 42] By: iain on 2002/11/01 13:23:19 Log: - Fixed to accomodate site change. - lynx.php doesn't appear to be doing as it used to. ! main/lib/WWW/Shorten/SnipURL.pm main/t/snipurl.t ! main/t/ws_snipurl.t ____________________________________________________________________________ [ 40] By: iain on 2002/10/30 16:33:54 Log: - 1.5.2 changes. ! main/Changes ____________________________________________________________________________ [ 39] By: iain on 2002/10/30 16:33:28 Log: - More name changing tests. - Inheritance tends to make symbol table futzing harder. + main/t/00load_a.t main/t/00load_b.t ! main/MANIFEST main/lib/WWW/Shorten/generic.pm main/t/00load.t ____________________________________________________________________________ [ 37] By: iain on 2002/10/30 16:21:06 Log: - Function name changing is possible. - newnames.t and ws_newnames.t test this. - import() for WWW::Shorten simplified by shunting stuff to the base class. + main/t/ws_newnames.t ! main/MANIFEST main/lib/WWW/Shorten.pm ! main/lib/WWW/Shorten/generic.pm main/t/newnames.t ____________________________________________________________________________ [ 36] By: iain on 2002/10/30 15:27:21 Log: - Versions updated for 1.5.2 - Have to think of something to with change logs now. - MANIFEST updated appropriately. - New tests added. + main/t/newnames.t ! main/Build.PL main/Changes main/MANIFEST ____________________________________________________________________________ [ 35] By: iain on 2002/10/30 15:23:36 Log: Versions moved to x.yy, and aren't taken from CVS ids. ! main/lib/WWW/Shorten/EkDk.pm main/lib/WWW/Shorten/Fcol.pm ! main/lib/WWW/Shorten/MakeAShorterLink.pm ! main/lib/WWW/Shorten/NotLong.pm ! main/lib/WWW/Shorten/QuickOnes.pm ! main/lib/WWW/Shorten/Shorl.pm main/lib/WWW/Shorten/SnipURL.pm ! main/lib/WWW/Shorten/TinyURL.pm ! main/lib/WWW/Shorten/generic.pm ____________________________________________________________________________ [ 34] By: iain on 2002/10/29 12:22:18 Log: + $DEBUG mode. [imported from CVS by cvs2p4 at 2002/10/30 01:14:15] ! main/lib/WWW/Shorten/SnipURL.pm ____________________________________________________________________________ [ 33] By: iain on 2002/10/29 12:22:09 Log: + 1.5.1 [imported from CVS by cvs2p4 at 2002/10/30 01:14:15] ! main/Build.PL main/Changes ____________________________________________________________________________ [ 32] By: iain on 2002/10/25 12:06:18 Log: + The new edition. [imported from CVS by cvs2p4 at 2002/10/30 01:14:15] ! main/t/00checkyaml.t ____________________________________________________________________________ [ 31] By: iain on 2002/10/25 12:06:06 Log: + ABSTRACT added. [imported from CVS by cvs2p4 at 2002/10/30 01:14:15] ! main/lib/WWW/Shorten.pm ____________________________________________________________________________ [ 30] By: iain on 2002/10/25 12:05:59 Log: + README is now auto-generated. + MANIFEST updated. [imported from CVS by cvs2p4 at 2002/10/30 01:14:15] ! main/MANIFEST ____________________________________________________________________________ [ 29] By: iain on 2002/10/25 12:05:59 Log: + README is now auto-generated. + MANIFEST updated. [imported from CVS by cvs2p4 at 2002/10/30 01:14:15] - main/README ____________________________________________________________________________ [ 28] By: iain on 2002/10/25 11:54:32 Log: + redir.ek.dk tests. [imported from CVS by cvs2p4 at 2002/10/30 01:14:15] + main/t/ekdk.t ____________________________________________________________________________ [ 27] By: iain on 2002/10/25 11:51:55 Log: - Module::Build rather than ExtUtils::MakeMaker. - SIGNATURE added. - Default style is 'MakeAShorterLink'. - THANKS section added. - LICENSE AND COPYRIGHT section added. - SnipURL.pm uses the API interface. - Auxiliary files cleaned up. - Basic tests added. - Fcol.org and add.redir.ek.dk added. - Tests for Fcol and EkDk added. [imported from CVS by cvs2p4 at 2002/10/30 01:14:15] + main/.cvsignore main/Build.PL main/MANIFEST.SKIP + main/lib/WWW/Shorten/EkDk.pm main/t/00checkyaml.t + main/t/00load.t main/t/00signature.t main/t/fcol.t ! main/Changes main/MANIFEST main/Makefile.PL main/TODO ! main/lib/WWW/Shorten.pm main/lib/WWW/Shorten/Fcol.pm ____________________________________________________________________________ [ 26] By: iain on 2002/10/25 11:06:25 Log: + SnipURL.pm now uses the API interface. [imported from CVS by cvs2p4 at 2002/10/30 01:14:15] ! main/lib/WWW/Shorten/SnipURL.pm ____________________________________________________________________________ [ 25] By: iain on 2002/10/25 11:05:52 Log: + fcol.org support. [imported from CVS by cvs2p4 at 2002/10/30 01:14:15] + main/lib/WWW/Shorten/Fcol.pm ____________________________________________________________________________ [ 24] By: iain on 2002/09/21 14:14:02 Log: + 1.4.2 [imported from CVS by cvs2p4 at 2002/10/30 01:14:15] ! main/Changes main/Makefile.PL ____________________________________________________________________________ [ 23] By: iain on 2002/09/21 14:11:46 Log: + Changed module description. + credited shank. [imported from CVS by cvs2p4 at 2002/10/30 01:14:15] ! main/lib/WWW/Shorten/SnipURL.pm ____________________________________________________________________________ [ 22] By: iain on 2002/09/21 13:37:31 Log: + Fixed scope of $code. [imported from CVS by cvs2p4 at 2002/10/30 01:14:15] ! main/t/notlong.t main/t/ws_notlong.t ____________________________________________________________________________ [ 21] By: iain on 2002/09/21 13:30:23 Log: + Correct scopes for variables. [imported from CVS by cvs2p4 at 2002/10/30 01:14:15] ! main/t/notlong.t main/t/shorl.t ____________________________________________________________________________ [ 20] By: iain on 2002/09/21 13:30:13 Log: + Remove mention of ($url,$password) syntax, since this module doesn't have that. [imported from CVS by cvs2p4 at 2002/10/30 01:14:15] ! main/lib/WWW/Shorten/SnipURL.pm ____________________________________________________________________________ [ 19] By: iain on 2002/09/21 13:29:45 Log: + Mention the newer modules rather than just the original three. [imported from CVS by cvs2p4 at 2002/10/30 01:14:15] ! main/lib/WWW/Shorten.pm ____________________________________________________________________________ [ 18] By: iain on 2002/09/21 13:29:33 Log: + Version updated. [imported from CVS by cvs2p4 at 2002/10/30 01:14:15] ! main/Makefile.PL ____________________________________________________________________________ [ 17] By: iain on 2002/09/20 11:32:18 Log: + Typo. [imported from CVS by cvs2p4 at 2002/10/30 01:14:15] ! main/t/01version.t ____________________________________________________________________________ [ 16] By: iain on 2002/09/20 11:32:01 Log: + BUGS section added to NotLong + THANKS section added to TinyURL [imported from CVS by cvs2p4 at 2002/10/30 01:14:15] ! main/lib/WWW/Shorten/NotLong.pm ! main/lib/WWW/Shorten/TinyURL.pm ____________________________________________________________________________ [ 15] By: iain on 2002/09/20 11:28:53 Log: + Tests for new modules added. + List versions (good for test reports) [imported from CVS by cvs2p4 at 2002/10/30 01:14:15] + main/t/01version.t main/t/notlong.t main/t/quickones.t + main/t/snipurl.t main/t/ws_notlong.t main/t/ws_quickones.t + main/t/ws_snipurl.t ____________________________________________________________________________ [ 14] By: iain on 2002/09/20 11:28:37 Log: + Refactoring to use W::S::generic. + NotLong, QuickOnes, SnipURL added. + TinyURL uses the generic interface. [imported from CVS by cvs2p4 at 2002/10/30 01:14:15] + main/lib/WWW/Shorten/NotLong.pm + main/lib/WWW/Shorten/QuickOnes.pm + main/lib/WWW/Shorten/SnipURL.pm + main/lib/WWW/Shorten/generic.pm ! main/lib/WWW/Shorten/MakeAShorterLink.pm ! main/lib/WWW/Shorten/Shorl.pm main/lib/WWW/Shorten/TinyURL.pm ____________________________________________________________________________ [ 13] By: iain on 2002/09/20 11:27:52 Log: + Refactoring to use W::S::generic. + Allow parameters to generic masl() [imported from CVS by cvs2p4 at 2002/10/30 01:14:15] ! main/lib/WWW/Shorten.pm ____________________________________________________________________________ [ 12] By: iain on 2002/09/20 11:27:06 Log: + QuickOnes, SnipURL and NotLong added. + 1.4 + TODO Added. [imported from CVS by cvs2p4 at 2002/10/30 01:14:15] + main/TODO ! main/MANIFEST main/Makefile.PL main/README ____________________________________________________________________________ [ 11] By: iain on 2002/09/16 13:54:47 Log: + 1.3.2 emendments. [imported from CVS by cvs2p4 at 2002/10/30 01:14:15] ! main/Changes ____________________________________________________________________________ [ 10] By: iain on 2002/09/16 13:52:37 Log: + Bump it up. [imported from CVS by cvs2p4 at 2002/10/30 01:14:15] ! main/Makefile.PL ____________________________________________________________________________ [ 9] By: iain on 2002/09/16 13:41:17 Log: + Mention where to report bugs. [imported from CVS by cvs2p4 at 2002/10/30 01:14:15] ! main/README main/lib/WWW/Shorten.pm ! main/lib/WWW/Shorten/MakeAShorterLink.pm ! main/lib/WWW/Shorten/Shorl.pm main/lib/WWW/Shorten/TinyURL.pm ____________________________________________________________________________ [ 8] By: iain on 2002/09/04 20:33:05 Log: + Version update. [imported from CVS by cvs2p4 at 2002/10/30 01:14:15] ! main/README ____________________________________________________________________________ [ 7] By: iain on 2002/09/04 20:32:29 Log: + Documentation nits. [imported from CVS by cvs2p4 at 2002/10/30 01:14:15] ! main/lib/WWW/Shorten/Shorl.pm main/lib/WWW/Shorten/TinyURL.pm ____________________________________________________________________________ [ 6] By: iain on 2002/09/04 20:32:19 Log: + Updated. [imported from CVS by cvs2p4 at 2002/10/30 01:14:15] ! main/Changes ____________________________________________________________________________ [ 5] By: iain on 2002/09/04 20:26:14 Log: + Document behaviour. [imported from CVS by cvs2p4 at 2002/10/30 01:14:15] ! main/lib/WWW/Shorten/Shorl.pm ____________________________________________________________________________ [ 4] By: iain on 2002/09/04 20:26:01 Log: + Hardwire package version. [imported from CVS by cvs2p4 at 2002/10/30 01:14:15] ! main/Makefile.PL ____________________________________________________________________________ [ 3] By: iain on 2002/09/04 20:20:46 Log: + Returns password in list context. [imported from CVS by cvs2p4 at 2002/10/30 01:14:15] ! main/lib/WWW/Shorten/Shorl.pm main/t/shorl.t ____________________________________________________________________________ [ 2] By: iain on 2002/08/29 18:24:43 Log: + Corrected apostrophe. [imported from CVS by cvs2p4 at 2002/10/30 01:14:15] ! main/lib/WWW/Shorten.pm ____________________________________________________________________________ [ 1] By: iain on 2002/08/29 17:55:54 Log: + 1.1 [imported from CVS by cvs2p4 at 2002/10/30 01:14:15] + main/Changes main/MANIFEST main/Makefile.PL main/README + main/lib/WWW/Shorten.pm + main/lib/WWW/Shorten/MakeAShorterLink.pm + main/lib/WWW/Shorten/Shorl.pm main/lib/WWW/Shorten/TinyURL.pm + main/t/masl.t main/t/shorl.t main/t/tinyurl.t main/t/ws_masl.t + main/t/ws_shorl.t main/t/ws_tinyurl.t WWW-Shorten-3.04/Changes000444001750001750 2076212205364257 15206 0ustar00dcrossdcross0000000000002013-08-22 Dave Cross - RELEASE_3.04 ======================================================== Dave Cross (17): * Finish removing all references to SnipURL.pm. * Bump to version 2.05 for release. * Removed support for shorl.pm (now in WWW::Shorten::Shorl distribution). * Bumped version number. Removed shorl files from MANIFEST. * Added Config::Auto to list of dependencies (it's used by the shorten program). Bumped version for release. * Default to using a service that we currently support. * Added MYMETA.yml to MANIFEST.SKIP. * Be far more intelligent about the code that allows the user to choose which service to use. * Bump version number for release. * Better examples of using bin/shorten * Added a WWW::Shorten::UserAgent object which dies if it receives an HTTP error response. * Added documentation. * Added META.json to MANIFEST. * Licensing clean-up. * Removed prototypes (and the ampersands in the tests that circumvented them) * Bump version number for release. * Moved Pod tests into xt. (Pod coverage currently fails on some files. See https://rt.cpan.org/Ticket/Display.html?id=87634 for details.) Dave Cross (1): * Removed support for NotLong and OneShortLink (separate distributions to follow soon). Bumper to version 2.06. Dave Cross (1): * Removed version number so it's picked up from lib/WWW/Shorten.pm yappo (1): * shorl.com was change the request method ( POST to GET ) 2012-04-06 Dave Cross - RELEASE_3.03 ======================================================== Dave Cross (20): * Removed a number of modules that supported services that are no longer around. * Documenation improvements. * Removed files from MANIFEST * Start using $DEFAULT_SERVICE variable. * Removed WWW::Shorten::SnipURL (API changed, separate dist will follow). Bumped version to 2.04. * Removed snipurl.t from MANIFEST. * Finish removing all references to SnipURL.pm. * Bump to version 2.05 for release. * Removed support for shorl.pm (now in WWW::Shorten::Shorl distribution). * Bumped version number. Removed shorl files from MANIFEST. * Added Config::Auto to list of dependencies (it's used by the shorten program). Bumped version for release. * Default to using a service that we currently support. * Added MYMETA.yml to MANIFEST.SKIP. * Be far more intelligent about the code that allows the user to choose which service to use. * Bump version number for release. * Better examples of using bin/shorten * Added a WWW::Shorten::UserAgent object which dies if it receives an HTTP error response. * Added documentation. * Added META.json to MANIFEST. * Licensing clean-up. Dave Cross (1): * Removed support for NotLong and OneShortLink (separate distributions to follow soon). Bumper to version 2.06. Dave Cross (1): * Removed version number so it's picked up from lib/WWW/Shorten.pm yappo (1): * shorl.com was change the request method ( POST to GET ) 2010-12-06 Dave Cross - RELEASE_3.02 ======================================================== Dave Cross (24): * Typo * Removed SIGNATURE from MANIFEST (as Module::Build adds it automatically). * Increment version * Changed require perl 5.6.0 to require perl 5.006 - to deal with older Perl installations. * Increment version number * Fixed TinyURL tests. * Bump version number. * Fixed typo * Remove signing * Removed a number of modules that supported services that are no longer around. * Documenation improvements. * Removed files from MANIFEST * Start using $DEFAULT_SERVICE variable. * Removed WWW::Shorten::SnipURL (API changed, separate dist will follow). Bumped version to 2.04. * Removed snipurl.t from MANIFEST. * Finish removing all references to SnipURL.pm. * Bump to version 2.05 for release. * Removed support for shorl.pm (now in WWW::Shorten::Shorl distribution). * Bumped version number. Removed shorl files from MANIFEST. * Added Config::Auto to list of dependencies (it's used by the shorten program). Bumped version for release. * Default to using a service that we currently support. * Added MYMETA.yml to MANIFEST.SKIP. * Be far more intelligent about the code that allows the user to choose which service to use. * Bump version number for release. Dave Cross (1): * Removed support for NotLong and OneShortLink (separate distributions to follow soon). Bumper to version 2.06. Dave Cross (1): * Removed version number so it's picked up from lib/WWW/Shorten.pm yappo (1): * shorl.com was change the request method ( POST to GET ) 2010-01-20 Dave Cross - RELEASE_3.00 =========================================================== Dave Cross (55): * Added WWW::Shorten::LinkToolbot * Added tests for LinkToolbot.pm and fixed module to pass them * Switched from Makefile.PL to Build.PL. * Fixed copyright line. Removed changelog from module file. * Changed email address in docs * Change to using manual version number. * Switch to manual version numbers * BabyURL is now dead * Typo * makeashorterlink.com is now dead! * removed unnecessary test * TinyURL now works in a slightly different way * Switched to manual version * tinyclick.com is dead * Change tests to use a still existing service * Switch to manual version number * Switch to manual version number * test a service that actually works * Updates to reflect changes in the way that notlong.pm works * Switched to manual version number. * Fixed to mirror the way that shorl.com now works. * Switch to manual version number * Reformatted documentation * Removed unused test file * Removed unneeded shebang lines * Fixes to reflect changes in the way snipurl.com works. * Switch to using the snipurl api. * link.toolbot.com is now dead. * Various test fixes * Various packaging fixes * Remove shortenrc. Add script_files to Build.PL * Increment version number for release * Fixes script_files. * Fixed test so it doesn't include a hard-coded code. * Increment version number * Marked tinylink.com as dead (it's not - but it's returning nonsense). Bumped to version 2.00. * Typo * Removed SIGNATURE from MANIFEST (as Module::Build adds it automatically). * Increment version * Changed require perl 5.6.0 to require perl 5.006 - to deal with older Perl installations. * Increment version number * Fixed TinyURL tests. * Bump version number. * Fixed typo * Remove signing * Removed a number of modules that supported services that are no longer around. * Documenation improvements. * Removed files from MANIFEST * Start using $DEFAULT_SERVICE variable. * Removed WWW::Shorten::SnipURL (API changed, separate dist will follow). Bumped version to 2.04. * Removed snipurl.t from MANIFEST. * Finish removing all references to SnipURL.pm. * Bump to version 2.05 for release. * Removed support for shorl.pm (now in WWW::Shorten::Shorl distribution). * Bumped version number. Removed shorl files from MANIFEST. Dave Cross (1): * Removed support for NotLong and OneShortLink (separate distributions to follow soon). Bumper to version 2.06. Dave Cross (1): * Removed version number so it's picked up from lib/WWW/Shorten.pm yappo (1): * shorl.com was change the request method ( POST to GET ) 2009-12-19 Dave Cross - RELEASE_2.06 ======================================================== * no changes since the previous version. 2009-09-08 Dave Cross - RELEASE_2.04 ======================================================== * no changes since the previous version. 2009-03-19 Dave Cross - RELEASE_2.03 ======================================================== * no changes since the previous version. 2008-06-29 Dave Cross - RELEASE_2_00 ======================================================== Dave Cross (1): * Release 2.00 2005-10-09 (no author) <(no author)> - RELEASE_1_97 ==================================================== (no author) <(no author)> (1): * This commit was manufactured by cvs2svn to create tag 'RELEASE_1_97'. WWW-Shorten-3.04/LICENCE000444001750001750 105612205364257 14653 0ustar00dcrossdcross000000000000LICENCE FOR WWW::Shorten 3.03 WWW::Shorten::NotLong copyright (c) Eric Hammond . Other modules copyright (c) Magnum Solutions Ltd., 2007. All rights reserved. Other modules copyright © Iain Truskett, 2002-2003. All rights reserved. This module is free software. You can redistribute it and/or modify it under the terms of the Artistic License 2.0. This program is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose. WWW-Shorten-3.04/Build.PL000444001750001750 207712205364257 15166 0ustar00dcrossdcross000000000000use Module::Build; my $build = Module::Build->new( module_name => 'WWW::Shorten', license => 'artistic_2', requires => { 'perl' => '5.006', 'LWP' => '5.75', 'LWP::UserAgent' => '2.023', 'URI' => '1.27', 'Config::Auto' => 0, }, build_requires => { 'Test::More' => '0.47', }, build_recommends => { 'Test::Pod' => 0, 'Test::Pod::Coverage' => 0, 'Test::Signature' => 0, }, create_makefile_pl => 'traditional', script_files => [ 'bin/shorten' ], ); $build->create_build_script; WWW-Shorten-3.04/Makefile.PL000444001750001750 125612205364257 15642 0ustar00dcrossdcross000000000000# Note: this file was auto-generated by Module::Build::Compat version 0.4005 require 5.006; use ExtUtils::MakeMaker; WriteMakefile ( 'NAME' => 'WWW::Shorten', 'VERSION_FROM' => 'lib/WWW/Shorten.pm', 'PREREQ_PM' => { 'Config::Auto' => 0, 'LWP' => '5.75', 'LWP::UserAgent' => '2.023', 'Test::More' => '0.47', 'URI' => '1.27' }, 'INSTALLDIRS' => 'site', 'EXE_FILES' => [ 'bin/shorten' ], 'PL_FILES' => {} ) ; WWW-Shorten-3.04/MANIFEST.SKIP000444001750001750 36512205364257 15546 0ustar00dcrossdcross000000000000\.sw.$ \bRCS\b \bCVS\b ^_build/ ^Build$ ^blib/ ^Makefile$ ^WWW-Shorten- ^MANIFEST.bak$ ^pm_to_blib$ ^Makefile.[a-z]+$ \.cvsignore$ \B\.svn\b ^diff ^patch \.patch$ ^log$ ^data\.yaml$ ^blibdirs$ ^cover_db/ ^WWW-Shorten/ \.tmp$ ~$ ^\. ^MYMETA.yml$ WWW-Shorten-3.04/CREDITS000444001750001750 147312205364257 14711 0ustar00dcrossdcross000000000000CREDITS FOR WWW::Shorten 1.88 Dave Cross for WWW::MakeAShorterLink Alex Page for the original LWP hacking on which Dave based his code. Simon Batistoni for giving the makealongerlink idea to Dave. Eric Hammond for writing the NotLong variant. Shashank Tripathi for providing both SnipURL.com and advice on the module. Kevin Gilbertson (Gilby) supplied information on the TinyURL API. Matt Felsen (mattf) wanted shorter function names. Ask Bjoern Hansen for providing both Metamark.net and advice on the module. Martin Thurn for helping me notice a bug and for a suggestion regarding MASL.pm. Jon and William (jon and wjr at smlnk.com respectively) for providing SmLnk.com. P J Goodwin for providing the code for WWW::Shorten::OneShortLink. And especial thanks to all providers of these services. WWW-Shorten-3.04/AUTHORS000444001750001750 70512205364257 14716 0ustar00dcrossdcross000000000000 Here is a list of people and their CPAN id, extracted from various places. These people have either submitted patches or suggestions, or their bug reports or comments have inspired the appropriate patches. Corrections, additions, deletions welcome: Kevin Gilbertson (Gilby) Iain Truskett (SPOON) Matt Felsen (mattf) In 2004, Dave Cross (CPAN id DAVECROSS) look over maintenance of this distribution following the death of Iain Truskett. WWW-Shorten-3.04/MANIFEST000444001750001750 122412205364257 15014 0ustar00dcrossdcross000000000000Artistic AUTHORS bin/shorten ChangeLog.SPOON Changes CREDITS INSTALL lib/WWW/Shorten.pm lib/WWW/Shorten/_dead.pm lib/WWW/Shorten/generic.pm lib/WWW/Shorten/Linkz.pm lib/WWW/Shorten/LinkToolbot.pm lib/WWW/Shorten/MakeAShorterLink.pm lib/WWW/Shorten/Metamark.pm lib/WWW/Shorten/TinyClick.pm lib/WWW/Shorten/Tinylink.pm lib/WWW/Shorten/TinyURL.pm lib/WWW/Shorten/UserAgent.pm LICENCE Makefile.PL Build.PL MANIFEST MANIFEST.SKIP META.yml README t/00load.t t/00load_a.t t/00load_b.t t/00noexp.t t/00sig.t t/01version.t xt/98pod-coverage.t xt/99pod.t t/linkz.t t/linktoolbot.t t/masl.t t/metamark.t t/newnames.t t/tinyclick.t t/tinylink.t t/tinyurl.t TODO META.json WWW-Shorten-3.04/META.json000444001750001750 422012205364257 15303 0ustar00dcrossdcross000000000000{ "abstract" : "Interface to URL shortening sites.", "author" : [ "Original Iain Truskett ", "Based on WWW::MakeAShorterLink by Dave Cross " ], "dynamic_config" : 1, "generated_by" : "Module::Build version 0.4005, CPAN::Meta::Converter version 2.130880", "license" : [ "artistic_2" ], "meta-spec" : { "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", "version" : "2" }, "name" : "WWW-Shorten", "prereqs" : { "build" : { "requires" : { "Test::More" : "0.47" } }, "configure" : { "requires" : { "Module::Build" : "0.40" } }, "runtime" : { "requires" : { "Config::Auto" : "0", "LWP" : "5.75", "LWP::UserAgent" : "2.023", "URI" : "1.27", "perl" : "5.006" } } }, "provides" : { "WWW::Shorten" : { "file" : "lib/WWW/Shorten.pm", "version" : "3.04" }, "WWW::Shorten::LinkToolbot" : { "file" : "lib/WWW/Shorten/LinkToolbot.pm", "version" : "1.90" }, "WWW::Shorten::Linkz" : { "file" : "lib/WWW/Shorten/Linkz.pm", "version" : "1.90" }, "WWW::Shorten::MakeAShorterLink" : { "file" : "lib/WWW/Shorten/MakeAShorterLink.pm", "version" : "1.90" }, "WWW::Shorten::Metamark" : { "file" : "lib/WWW/Shorten/Metamark.pm", "version" : "1.91" }, "WWW::Shorten::TinyClick" : { "file" : "lib/WWW/Shorten/TinyClick.pm", "version" : "1.90" }, "WWW::Shorten::TinyURL" : { "file" : "lib/WWW/Shorten/TinyURL.pm", "version" : "1.90" }, "WWW::Shorten::UserAgent" : { "file" : "lib/WWW/Shorten/UserAgent.pm" }, "WWW::Shorten::generic" : { "file" : "lib/WWW/Shorten/generic.pm", "version" : "1.92" } }, "release_status" : "stable", "resources" : { "license" : [ "http://www.perlfoundation.org/artistic_license_2_0" ] }, "version" : "3.04" } WWW-Shorten-3.04/README000444001750001750 126412205364257 14547 0ustar00dcrossdcross000000000000WWW::Shorten Interface to URL shortening sites. For installation details, see INSTALL. For usage, see the doco. Either use perldoc or view it on the web at: Changes for 1.88 (13 Nov 2003) - Added OneShortLink, http://1sl.net/ - EkDk service removed. - ShortLink service removed. - qURL service removed. - TinyClick made their URLs slightly harder to find. - SmLnk ID scheme has changed. - Metamark tests tidied. - Notlong tests tidied. - Shorl test precedence fixed. - Mention CGI::Shorten. - Mention http://dellah.org/shorten/ For a complete list of changes, see the Changes file. by Iain Truskett. WWW-Shorten-3.04/Artistic000444001750001750 2067512205364257 15423 0ustar00dcrossdcross000000000000 The "Artistic License 2.0" Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble This license establishes the terms under which a given free software Package may be copied, modified, distributed, and/or redistributed. The intent is that the Copyright Holder maintains some artistic control over the development of that Package while still keeping the Package available as open source and free software. You are always permitted to make arrangements wholly outside of this license directly with the Copyright Holder of a given Package. If the terms of this license do not permit the full use that you propose to make of the Package, you should contact the Copyright Holder and seek a different licensing arrangement. Definitions "Copyright Holder" means the individual(s) or organization(s) named in the copyright notice for the entire Package. "Contributor" means any party that has contributed code or other material to the Package, in accordance with the Copyright Holder's procedures. "You" and "your" means any person who would like to copy, distribute, or modify the Package. "Package" means the collection of files distributed by the Copyright Holder, and derivatives of that collection and/or of those files. A given Package may consist of either the Standard Version, or a Modified Version. "Distribute" means providing a copy of the Package or making it accessible to anyone else, or in the case of a company or organization, to others outside of your company or organization. "Distributor Fee" means any fee that you charge for Distributing this Package or providing support for this Package to another party. It does not mean licensing fees. "Standard Version" refers to the Package if it has not been modified, or has been modified only in ways explicitly requested by the Copyright Holder. "Modified Version" means the Package, if it has been changed, and such changes were not explicitly requested by the Copyright Holder. "Original License" means this Artistic License as Distributed with the Standard Version of the Package, in its current version or as it may be modified by The Perl Foundation in the future. "Source" form means the source code, documentation source, and configuration files for the Package. "Compiled" form means the compiled bytecode, object code, binary, or any other form resulting from mechanical transformation or translation of the Source form. Permission for Use and Modification Without Distribution (1) You are permitted to use the Standard Version and create and use Modified Versions for any purpose without restriction, provided that you do not Distribute the Modified Version. Permissions for Redistribution of the Standard Version (2) You may Distribute verbatim copies of the Source form of the Standard Version of this Package in any medium without restriction, either gratis or for a Distributor Fee, provided that you duplicate all of the original copyright notices and associated disclaimers. At your discretion, such verbatim copies may or may not include a Compiled form of the Package. (3) You may apply any bug fixes, portability changes, and other modifications made available from the Copyright Holder. The resulting Package will still be considered the Standard Version, and as such will be subject to the Original License. Distribution of Modified Versions of the Package as Source (4) You may Distribute your Modified Version as Source (either gratis or for a Distributor Fee, and with or without a Compiled form of the Modified Version) provided that you clearly document how it differs from the Standard Version, including, but not limited to, documenting any non-standard features, executables, or modules, and provided that you do at least ONE of the following: (a) make the Modified Version available to the Copyright Holder of the Standard Version, under the Original License, so that the Copyright Holder may include your modifications in the Standard Version. (b) ensure that installation of your Modified Version does not prevent the user installing or running the Standard Version. In addition, the Modified Version must bear a name that is different from the name of the Standard Version. (c) allow anyone who receives a copy of the Modified Version to make the Source form of the Modified Version available to others under (i) the Original License or (ii) a license that permits the licensee to freely copy, modify and redistribute the Modified Version using the same licensing terms that apply to the copy that the licensee received, and requires that the Source form of the Modified Version, and of any works derived from it, be made freely available in that license fees are prohibited but Distributor Fees are allowed. Distribution of Compiled Forms of the Standard Version or Modified Versions without the Source (5) You may Distribute Compiled forms of the Standard Version without the Source, provided that you include complete instructions on how to get the Source of the Standard Version. Such instructions must be valid at the time of your distribution. If these instructions, at any time while you are carrying out such distribution, become invalid, you must provide new instructions on demand or cease further distribution. If you provide valid instructions or cease distribution within thirty days after you become aware that the instructions are invalid, then you do not forfeit any of your rights under this license. (6) You may Distribute a Modified Version in Compiled form without the Source, provided that you comply with Section 4 with respect to the Source of the Modified Version. Aggregating or Linking the Package (7) You may aggregate the Package (either the Standard Version or Modified Version) with other packages and Distribute the resulting aggregation provided that you do not charge a licensing fee for the Package. Distributor Fees are permitted, and licensing fees for other components in the aggregation are permitted. The terms of this license apply to the use and Distribution of the Standard or Modified Versions as included in the aggregation. (8) You are permitted to link Modified and Standard Versions with other works, to embed the Package in a larger work of your own, or to build stand-alone binary or bytecode versions of applications that include the Package, and Distribute the result without restriction, provided the result does not expose a direct interface to the Package. Items That are Not Considered Part of a Modified Version (9) Works (including, but not limited to, modules and scripts) that merely extend or make use of the Package, do not, by themselves, cause the Package to be a Modified Version. In addition, such works are not considered parts of the Package itself, and are not subject to the terms of this license. General Provisions (10) Any use, modification, and distribution of the Standard or Modified Versions is governed by this Artistic License. By using, modifying or distributing the Package, you accept this license. Do not use, modify, or distribute the Package, if you do not accept this license. (11) If your Modified Version has been derived from a Modified Version made by someone other than you, you are nevertheless required to ensure that your Modified Version complies with the requirements of this license. (12) This license does not grant you the right to use any trademark, service mark, tradename, or logo of the Copyright Holder. (13) This license includes the non-exclusive, worldwide, free-of-charge patent license to make, have made, use, offer to sell, sell, import and otherwise transfer the Package with respect to any patent claims licensable by the Copyright Holder that are necessarily infringed by the Package. If you institute patent litigation (including a cross-claim or counterclaim) against any party alleging that the Package constitutes direct or contributory patent infringement, then this Artistic License to you shall terminate on the date that such litigation is filed. (14) Disclaimer of Warranty: THE PACKAGE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS "AS IS' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES. THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT ARE DISCLAIMED TO THE EXTENT PERMITTED BY YOUR LOCAL LAW. UNLESS REQUIRED BY LAW, NO COPYRIGHT HOLDER OR CONTRIBUTOR WILL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING IN ANY WAY OUT OF THE USE OF THE PACKAGE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. WWW-Shorten-3.04/TODO000444001750001750 15012205364257 14330 0ustar00dcrossdcross000000000000qurl: site doesn't work ekdk: site doesn't work shortlink: site no longer a shortener snipurl: too slow WWW-Shorten-3.04/xt000755001750001750 012205364257 14162 5ustar00dcrossdcross000000000000WWW-Shorten-3.04/xt/98pod-coverage.t000444001750001750 24112205364257 17215 0ustar00dcrossdcross000000000000use Test::More; eval "use Test::Pod::Coverage 1.04"; plan skip_all => "Test::Pod::Coverage 1.04 required for testing POD coverage" if $@; all_pod_coverage_ok(); WWW-Shorten-3.04/xt/99pod.t000444001750001750 21612205364257 15427 0ustar00dcrossdcross000000000000use strict; use Test::More; eval "use Test::Pod 1.00"; plan skip_all => "Test::Pod 1.00 required for testing POD" if $@; all_pod_files_ok(); WWW-Shorten-3.04/lib000755001750001750 012205364257 14275 5ustar00dcrossdcross000000000000WWW-Shorten-3.04/lib/WWW000755001750001750 012205364257 14761 5ustar00dcrossdcross000000000000WWW-Shorten-3.04/lib/WWW/Shorten.pm000444001750001750 1361512205364257 17124 0ustar00dcrossdcross000000000000#$Id$ =head1 NAME WWW::Shorten - Interface to URL shortening sites. =head1 SYNOPSIS use WWW::Shorten 'Linkz'; use WWW::Shorten 'MakeAShorterLink'; use WWW::Shorten 'Metamark'; use WWW::Shorten 'NotLong'; use WWW::Shorten 'OneShortLink'; use WWW::Shorten 'Shorl'; use WWW::Shorten 'TinyClick'; use WWW::Shorten 'TinyLink'; use WWW::Shorten 'TinyURL'; # Individual modules have have their # own syntactic variations. # See the documentation for the particular # module you intend to use for details, trips # and traps. $short_url = makeashorterlink($long_url); $long_url = makealongerlink($short_url); # If you don't like the function names: use WWW::Shorten 'Metamark', ':short'; $short_url = short_link( $long_url ); $long_url = long_link( $short_url ); =head1 ABSTRACT A Perl interface to URL shortening sites. These sites maintain databases of long URLs, each of which has a unique identifier. =head1 DESCRIPTION The function C will call the relevant web site passing it your long URL and will return the shorter version. The function C does the reverse. C will accept as an argument either the full shortened URL or just the identifier. If anything goes wrong, then either function will return C. =cut package WWW::Shorten; use 5.006; use strict; use warnings; use base qw(WWW::Shorten::generic); our @EXPORT = qw(makeashorterlink makealongerlink); our $VERSION = '3.04'; our $DEFAULT_SERVICE = 'Metamark'; use Carp; my $style; =head1 Subroutines =head2 import Called when the module is Cd. Loads the correct sub-module =cut sub import { my $class = shift; $style = shift; $style = $DEFAULT_SERVICE unless defined $style; my $package = "${class}::${style}"; eval { my $file = $package; $file =~ s/::/\//g; require "$file.pm"; }; croak $@ if $@; $package->import( @_ ); } 1; __END__ =head2 EXPORT makeashorterlink, makealongerlink Or, if you specify C<:short> on the import line, you instead get C and C. If you explicitly want the default set, use C<:default>. Actually these functions are exported from the relevant subclass. =head1 COMMAND LINE PROGRAM A very simple program called F is supplied in the distribution's F folder. This program takes a URL and gives you a shortened version of it. =head1 EXAMPLES and PROGRAMS Adam Kessel wrote F, a program that uses C to filter a file, converting long URLs to short ones. http://bostoncoop.net/adam/shorlfilter There is also a F directory in this distribution which contains a sample program. =head1 NO LONGER SUPPORTED The URL-shortening industry is pretty volatile. Many sites exist for a while and then go away. The most famous of those is probably Make A Shorter Link (the site that originally inspired this suite of modules). MASL has been acquired by TinyURL.com and no longer exists. Here is a list of sites that were once supported by this module and are no longer with us: =over 4 =item MakeAShorterLink =item BabyURL =item EkDk =item qURL (although the differently capitalised Qurl.com now uses their old domain) =item ShortLink =item SmLnk =item URLjr =item V3 =back See Joshua Schachter's blog entry at L for some very interesting discussion on some problems that can be caused by the volatility of this part of the web industry. =head1 RELATED MODULES =head2 Similar Aim L is what this module was originally based upon. That module is obsoleted by L, one of the many subclasses of L. Of course, with the demise of Make A Shorter Link, neither the obsolete module nor its replacement are of any use. =head2 Same Area, Different Purpose L provides building blocks for you to create your own URL shortening service. It provides routines to shoretn a URL, lengthen one, and it keeps a store. Nice and easy. =head1 THANKS Dave Cross for L Alex Page for the original LWP hacking on which Dave based his code. Simon Batistoni for giving the C idea to Dave. Eric Hammond for writing the NotLong variant. Shashank Tripathi for providing both SnipURL.com and advice on the module. Kevin Gilbertson (Gilby) supplied information on the TinyURL API. Matt Felsen (mattf) wanted shorter function names. Ask Bjoern Hansen for providing both Metamark.net and advice on the module. Martin Thurn for helping me notice a bug and for a suggestion regarding F. Jon and William (jon and wjr at smlnk.com respectively) for providing SmLnk.com. P J Goodwin for providing the code for L. And especial thanks to all providers of these services. =head1 BUGS, REQUESTS, COMMENTS Support for this module is supplied using the CPAN RT system via the web or email: http://rt.cpan.org/NoAuth/ReportBug.html?Queue=WWW-Shorten ( shorter URL: http://xrl.us/rfb ) bug-www-shorten@rt.cpan.org This makes it much easier for me to track things and thus means your problem is less likely to be neglected. =head1 LICENCE AND COPYRIGHT WWW::Shorten::NotLong copyright (c) Eric Hammond . Other modules copyright (c) Magnum Solutions Ltd., 2007. All rights reserved. This module is free software. You can redistribute it and/or modify it under the terms of the Artistic License 2.0. This program is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose. =head1 AUTHOR Original Iain Truskett Based on WWW::MakeAShorterLink by Dave Cross In 2004 Dave Cross took over the maintenance of this distribution following the death of Iain Truskett. =head1 SEE ALSO L, L. =cut WWW-Shorten-3.04/lib/WWW/Shorten000755001750001750 012205364257 16403 5ustar00dcrossdcross000000000000WWW-Shorten-3.04/lib/WWW/Shorten/Linkz.pm000444001750001750 422412205364257 20167 0ustar00dcrossdcross000000000000# $Id$ =head1 NAME WWW::Shorten::Linkz - Perl interface to lin.kz =head1 SYNOPSIS use WWW::Shorten 'Linkz'; $short_url = makeashorterlink($long_url); $long_url = makealongerlink($short_url); $long_url = makealongerlink($nickname); =head1 DESCRIPTION A Perl interface to the web site lin.kz. lin.kz simply maintains a database of long URLs, each of which has a unique identifier. =cut package WWW::Shorten::Linkz; use 5.006; use strict; use warnings; use base qw( WWW::Shorten::generic Exporter ); our @EXPORT = qw(makeashorterlink makealongerlink); our $VERSION = '1.90'; use Carp; #POST http://lin.kz/make.php # url= # =Shorten URL! (submit) # privkey= # =head1 Functions =head2 makeashorterlink The function C will call the lin.kz web site passing it your long URL and will return the shorter (Linkz) version. Multiple submissions of the same URL will result in different codes being returned. =cut sub makeashorterlink { my $url = shift or croak 'No URL passed to makeashorterlink'; my $ua = __PACKAGE__->ua(); my $resp = $ua->post( 'http://lin.kz/make.php', [ url => $url, ], ); return unless $resp->is_success; if ($resp->content =~ m! \Q does the reverse. C will accept as an argument either the full Linkz URL or just the Linkz identifier/nickname. If anything goes wrong, then either function will return C. =cut sub makealongerlink { my $code = shift or croak 'No Linkz nickname/URL passed to makealongerlink'; my $ua = __PACKAGE__->ua(); $code = "http://lin.kz/?$code" unless $code =~ m!^http://!i; my $resp = $ua->get($code); my $location = $resp->header('Location'); return $location if defined $location; return; } 1; __END__ =head2 EXPORT makeashorterlink, makealongerlink =head1 SUPPORT, LICENCE, THANKS and SUCH See the main L docs. =head1 AUTHOR Iain Truskett =head1 SEE ALSO L, L, L =cut WWW-Shorten-3.04/lib/WWW/Shorten/Metamark.pm000444001750001750 421712205364257 20643 0ustar00dcrossdcross000000000000# $Id$ =head1 NAME WWW::Shorten::Metamark - Perl interface to metamark.net =head1 SYNOPSIS use WWW::Shorten::Metamark; use WWW::Shorten 'Metamark'; $short_url = makeashorterlink($long_url); $long_url = makealongerlink($short_url); =head1 DESCRIPTION A Perl interface to the web site metamark.net. Metamark simply maintains a database of long URLs, each of which has a unique identifier. =cut package WWW::Shorten::Metamark; use 5.006; use strict; use warnings; use base qw( WWW::Shorten::generic Exporter ); our @EXPORT = qw(makeashorterlink makealongerlink); our $VERSION = '1.91'; use Carp; =head1 Functions =head2 makeashorterlink The function C will call the Metamark web site passing it your long URL and will return the shorter Metamark version. =cut sub makeashorterlink { my $url = shift or croak 'No URL passed to makeashorterlink'; my $ua = __PACKAGE__->ua(); my $resp = $ua->post( 'http://metamark.net/api/rest/simple', [ long_url => $url, ] ); return unless $resp->is_success; return if $resp->content =~ /^ERROR:/; # I love REST. It's so simple when done properly. return $resp->content; } =head2 makealongerlink The function C does the reverse. C will accept as an argument either the full Metamark URL or just the Metamark identifier. If anything goes wrong, then either function will return C. =cut sub makealongerlink { my $short_url = shift or croak 'No Metamark key / URL passed to makealongerlink'; my $ua = __PACKAGE__->ua(); my $resp = $ua->post( 'http://metamark.net/api/rest/simple', [ short_url => $short_url, ] ); return unless $resp->is_success; return if $resp->content =~ /^ERROR:/; # I love REST. It's so simple when done properly. return $resp->content; } 1; __END__ =head2 EXPORT makeashorterlink, makealongerlink =head1 SUPPORT, LICENCE, THANKS and SUCH See the main L docs. =head1 AUTHOR Iain Truskett Based on WWW::MakeAShorterLink by Dave Cross =head1 SEE ALSO L, L, L =cut WWW-Shorten-3.04/lib/WWW/Shorten/TinyClick.pm000444001750001750 133412205364257 20770 0ustar00dcrossdcross000000000000# $Id$ package WWW::Shorten::TinyClick; use strict; use warnings; our $VERSION = '1.90'; require WWW::Shorten::_dead; 0; __END__ =head1 NAME WWW::Shorten::TinyClick - Perl interface to tinyclick.com =head1 SYNOPSIS # No appropriate synopsis. =head1 DESCRIPTION A Perl interface to the web site tinyclick.com. Unfortunately, this service became inactive at some point between 1.89 and 1.90, so this module will merely give you an error if you try to use it. Feel free to pick a different L. =head1 SUPPORT, LICENCE, THANKS and SUCH See the main L docs. =head1 AUTHOR Iain Truskett , Dave Cross =head1 SEE ALSO L, L =cut WWW-Shorten-3.04/lib/WWW/Shorten/generic.pm000444001750001750 263312205364257 20516 0ustar00dcrossdcross000000000000# $Id$ =head1 NAME WWW::Shorten::generic - Methods shared across all WWW::Shorten modules =head1 SYNOPSIS use WWW::Shorten 'SomeSubclass'; =head1 DESCRIPTION Contains methds that are shared across all WWW::Shorten implemenation modules. =cut package WWW::Shorten::generic; use 5.006; use strict; use warnings; our $VERSION = 1.92; use WWW::Shorten::UserAgent; use Carp; my %name_sets = ( default => [qw( makeashorterlink makealongerlink )], short => [qw( short_link long_link )], ); sub import { my $class = shift; my ($package) = caller; ($package) = caller(1) if $package eq 'WWW::Shorten'; my $set = shift; if (defined $set and $set =~ /^ : (\w+) $/x) { $set = $1; } else { $set = 'default'; } if ( exists $name_sets{$set} ) { no strict 'refs'; *{"${package}::$name_sets{$set}[0]"} = *{ "${class}::$name_sets{default}[0]"}; *{"${package}::$name_sets{$set}[1]"} = *{ "${class}::$name_sets{default}[1]"}; } else { croak "Unknown function set - $set."; } } my $ua; =head1 FUNCTIONS =head2 ua Returns the object's LWP::Useragent attribute. Creates a new one if one doesn't already exist. =cut sub ua { my $self = shift; return $ua if defined $ua; my $v = $self->VERSION(); $ua = WWW::Shorten::UserAgent->new( env_proxy => 1, timeout => 30, agent => "$self/$v", requests_redirectable => [], ); return $ua; } 1; WWW-Shorten-3.04/lib/WWW/Shorten/_dead.pm000444001750001750 66212205364257 20116 0ustar00dcrossdcross000000000000# $Id$ package WWW::Shorten::_dead; use strict; use warnings; our $VERSION = '1.92'; die <<'EOF'; This WWW::Shorten service is inactive. Please use a different one. EOF 1; =head1 NAME WWW::Shorten::_dead - Where dead link-shortening services got =head1 SYNOPSIS # No appropriate synopsis =head1 DESCRIPTION This is just a module that we use for link-shortening services that we used to support but which no longer exist. WWW-Shorten-3.04/lib/WWW/Shorten/Tinylink.pm000444001750001750 475512205364257 20712 0ustar00dcrossdcross000000000000# $Id$ use strict; use warnings; our $VERSION = '1.91'; require WWW::Shorten::_dead; 0; __END__ =head1 NAME WWW::Shorten::Tinylink - Perl interface to Tinylink.com =head1 SYNOPSIS # No appropriate solution =head1 DESCRIPTION A Perl interface to the web site Tinylink.com. Tinylink.com simply maintains a database of long URLs, each of which has a unique identifier. Unfortunately, at some point in the middle of 2008, Tinylink.com stopped returning useable URLs and therefore this module is now deprecated. =cut package WWW::Shorten::Tinylink; use 5.006; use strict; use warnings; use base qw( WWW::Shorten::generic Exporter ); our @EXPORT = qw(makeashorterlink makealongerlink); our $VERSION = '1.90'; use Carp; =head1 Functions =head2 makeashorterlink The function C will call the Tinylink.com web site passing it your long URL and will return the shorter (tinylink) version. Multiple submissions of the same URL will result in different codes being returned. =cut sub makeashorterlink { my $url = shift or croak 'No URL passed to makeashorterlink'; my $ua = __PACKAGE__->ua(); my $resp = $ua->post( 'http://www.digipills.com/tinylink/ajout.php', [ lurl => $url, ], ); return unless $resp->is_success; if ($resp->content =~ m! \Q does the reverse. C will accept as an argument either the full Tinylink URL or just the Tinylink identifier/nickname. If anything goes wrong, then either function will return C. =cut sub makealongerlink { my $code = shift or croak 'No Tinylink nickname/URL passed to makealongerlink'; my $ua = __PACKAGE__->ua(); my $short; unless ( $code =~ m!^http://!i ) { $short = $code; $code = "http://tinylink.com/?$code"; } else { ($short) = $code =~ /\?(\w+)/; } my $resp = $ua->get($code); while ( my $location = $resp->header('Location') ) { $resp = $ua->get( $location ); } if ( my $refresh = $resp->header('Refresh') ) { return $2 if $refresh =~ m/; *URL=(['"]?)(.*)\1$/i; } return; } 1; __END__ =head2 EXPORT makeashorterlink, makealongerlink =head1 SUPPORT, LICENCE, THANKS and SUCH See the main L docs. =head1 AUTHOR Iain Truskett =head1 SEE ALSO L, L, L =cut WWW-Shorten-3.04/lib/WWW/Shorten/LinkToolbot.pm000444001750001750 143112205364257 21335 0ustar00dcrossdcross000000000000# $Id: MakeAShorterLink.pm 48 2007-04-15 15:03:55Z dave $ package WWW::Shorten::LinkToolbot; use strict; use warnings; our $VERSION = '1.90'; require WWW::Shorten::_dead; 0; __END__ =head1 NAME WWW::Shorten::LinkToolbot - Perl interface to link.toolbot.com =head1 SYNOPSIS # No appropriate synopsis. =head1 DESCRIPTION A Perl interface to the web site link.toolbot.com. Unfortunately, this service became inactive at some point between 1.89 and 1.90, so this module will merely give you an error if you try to use it. Feel free to pick a different L. =head1 SUPPORT, LICENCE, THANKS and SUCH See the main L docs. =head1 AUTHOR Iain Truskett , Dave Cross =head1 SEE ALSO L, L =cut WWW-Shorten-3.04/lib/WWW/Shorten/TinyURL.pm000444001750001750 417412205364257 20412 0ustar00dcrossdcross000000000000# $Id$ =head1 NAME WWW::Shorten::TinyURL - Perl interface to tinyurl.com =head1 SYNOPSIS use WWW::Shorten::TinyURL; use WWW::Shorten 'TinyURL'; $short_url = makeashorterlink($long_url); $long_url = makealongerlink($short_url); =head1 DESCRIPTION A Perl interface to the web site tinyurl.com. TinyURL simply maintains a database of long URLs, each of which has a unique identifier. =cut package WWW::Shorten::TinyURL; use 5.006; use strict; use warnings; use base qw( WWW::Shorten::generic Exporter ); our @EXPORT = qw( makeashorterlink makealongerlink ); our $VERSION = '1.90'; use Carp; =head1 Functions =head2 makeashorterlink The function C will call the TinyURL web site passing it your long URL and will return the shorter TinyURL version. =cut sub makeashorterlink { my $url = shift or croak 'No URL passed to makeashorterlink'; my $ua = __PACKAGE__->ua(); my $tinyurl = 'http://tinyurl.com/api-create.php'; my $resp = $ua->post($tinyurl, [ url => $url, source => "PerlAPI-$VERSION", ]); return undef unless $resp->is_success; my $content = $resp->content; return undef if $content =~ /Error/; if ($resp->content =~ m!(\Qhttp://tinyurl.com/\E\w+)!x) { return $1; } return; } =head2 makealongerlink The function C does the reverse. C will accept as an argument either the full TinyURL URL or just the TinyURL identifier. If anything goes wrong, then either function will return C. =cut sub makealongerlink { my $tinyurl_url = shift or croak 'No TinyURL key / URL passed to makealongerlink'; my $ua = __PACKAGE__->ua(); $tinyurl_url = "http://tinyurl.com/$tinyurl_url" unless $tinyurl_url =~ m!^http://!i; my $resp = $ua->get($tinyurl_url); return undef unless $resp->is_redirect; my $url = $resp->header('Location'); return $url; } 1; __END__ =head2 EXPORT makeashorterlink, makealongerlink =head1 SUPPORT, LICENCE, THANKS and SUCH See the main L docs. =head1 AUTHOR Iain Truskett =head1 SEE ALSO L, L, L =cut WWW-Shorten-3.04/lib/WWW/Shorten/UserAgent.pm000444001750001750 263312205364257 20777 0ustar00dcrossdcross000000000000package WWW::Shorten::UserAgent; use strict; use warnings; use base 'LWP::UserAgent'; =head1 NAME WWW::Shorten::UserAgent - LWP::UserAgent subclass for WWW::Shorten modules. =head1 SYNOPSIS use WWW::Shorten::UserAgent; my $ua = WWW::Shorten::UserAgent->new; my $resp = eval { $ua->get($url); }; =head1 DESCRIPTION Subclass of LWP::UserAgent which works the same way as the supoerclass except that it throws an exception if the C or C method returns an error. See L for the full documentation. =head1 METHODS =head2 get Makes an HTTP GET request and throws an exception on error. =cut sub get { my $self = shift; my $resp = $self->SUPER::get(@_); die $resp->status_line if $resp->is_error; return $resp; } =head2 post Makes an HTTP POST request and throws an exception on error. =cut sub post { my $self = shift; my $resp = $self->SUPER::post(@_); die $resp->status_line if $resp->is_error; return $resp; } 1; =head1 LICENCE AND COPYRIGHT Copyright (c) Magnum Solutions Ltd., 2012. All rights reserved. This module is free software. You can redistribute it and/or modify it under the terms of the Artistic License 2.0. This program is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose. =head1 AUTHOR Dave Cross =cut WWW-Shorten-3.04/lib/WWW/Shorten/MakeAShorterLink.pm000444001750001750 135712205364257 22247 0ustar00dcrossdcross000000000000# $Id$ package WWW::Shorten::MakeAShorterLink; use strict; use warnings; our $VERSION = '1.90'; require WWW::Shorten::_dead; 0; __END__ =head1 NAME WWW::Shorten::MakeAShorterLink - Perl interface to makeashorterlink.com =head1 SYNOPSIS # No appropriate synopsis. =head1 DESCRIPTION A Perl interface to the web site babyurl.com. Unfortunately, this service became inactive at some point between 1.89 and 1.90, so this module will merely give you an error if you try to use it. Feel free to pick a different L. =head1 SUPPORT, LICENCE, THANKS and SUCH See the main L docs. =head1 AUTHOR Iain Truskett , Dave Cross =head1 SEE ALSO L, L =cut WWW-Shorten-3.04/t000755001750001750 012205364257 13772 5ustar00dcrossdcross000000000000WWW-Shorten-3.04/t/metamark.t000444001750001750 74512205364257 16103 0ustar00dcrossdcross000000000000use Test::More tests => 7; BEGIN { use_ok WWW::Shorten::Metamark }; my $url = 'http://dave.org.uk/'; my $short = makeashorterlink( $url ); ok((defined $short), 'Reasonable response'); like ( $short => qr{^http://xrl\.us/\w+$}, 'make it shorter' ); is ( makealongerlink( $short ) => $url, 'make it longer' ); my ($rs) = $short =~ m# / (\w+) $ #x; is ( makealongerlink($rs) => $url, 'make it longer by Id' ); eval { makeashorterlink() }; ok($@); eval { makealongerlink() }; ok($@); WWW-Shorten-3.04/t/masl.t000444001750001750 22412205364257 15226 0ustar00dcrossdcross000000000000use Test::More tests => 1; eval { require WWW::Shorten::MakeAShorterLink }; like( $@, qr/inactive/, "Service correctly reports it is inactive." ); WWW-Shorten-3.04/t/00sig.t000444001750001750 22012205364257 15210 0ustar00dcrossdcross000000000000use Test::More tests => 1; eval "use Test::Signature 1.04"; SKIP: { skip "Test::Signature not installed.", 1 if $@; signature_ok(); } WWW-Shorten-3.04/t/tinyurl.t000444001750001750 107012205364257 16020 0ustar00dcrossdcross000000000000use Test::More tests => 6; BEGIN { use_ok WWW::Shorten::TinyURL }; my $url = 'http://search.cpan.org/dist/WWW-Shorten/'; my $return = makeashorterlink($url); my ($code) = $return =~ /(\w+)$/; my $prefix = 'http://tinyurl.com/'; is ( makeashorterlink($url), $prefix.$code, 'make it shorter'); is ( makealongerlink($prefix.$code), $url, 'make it longer'); is ( makealongerlink($code), $url, 'make it longer by Id',); eval { makeashorterlink() }; ok($@, 'makeashorterlink fails with no args'); eval { makealongerlink() }; ok($@, 'makealongerlink fails with no args'); WWW-Shorten-3.04/t/newnames.t000444001750001750 61012205364257 16106 0ustar00dcrossdcross000000000000use Test::More tests => 6; use WWW::Shorten qw( Metamark :short ); ok( exists $::{'short_link'}, 'shorter exists'); ok( exists $::{'long_link'}, 'longer exists'); use WWW::Shorten qw( Metamark :default ); ok( exists $::{'makeashorterlink'}, 'shorter exists'); ok( exists $::{'makealongerlink'}, 'longer exists'); eval { makeashorterlink() }; ok($@); eval { makealongerlink() }; ok($@); WWW-Shorten-3.04/t/linktoolbot.t000444001750001750 21712205364257 16634 0ustar00dcrossdcross000000000000use Test::More tests => 1; eval { require WWW::Shorten::LinkToolbot }; like( $@, qr/inactive/, "Service correctly reports it is inactive." ); WWW-Shorten-3.04/t/tinylink.t000444001750001750 21412205364257 16132 0ustar00dcrossdcross000000000000use Test::More tests => 1; eval { require WWW::Shorten::Tinylink }; like( $@, qr/inactive/, "Service correctly reports it is inactive." ); WWW-Shorten-3.04/t/tinyclick.t000444001750001750 21512205364257 16263 0ustar00dcrossdcross000000000000use Test::More tests => 1; eval { require WWW::Shorten::TinyClick }; like( $@, qr/inactive/, "Service correctly reports it is inactive." ); WWW-Shorten-3.04/t/01version.t000444001750001750 25512205364257 16124 0ustar00dcrossdcross000000000000use Test::More tests => 1; use LWP::UserAgent qw(); diag 'Test::More '.Test::More->VERSION(); diag 'LWP::UserAgent '.LWP::UserAgent->VERSION(); pass("Versions checked."); WWW-Shorten-3.04/t/00load.t000444001750001750 33012205364257 15347 0ustar00dcrossdcross000000000000use Test::More tests => 3; # Basic test of 'does the module load, damnit!' BEGIN { use_ok 'WWW::Shorten' } ok( exists $::{'makeashorterlink'}, 'shorter exists'); ok( exists $::{'makealongerlink'}, 'longer exists'); WWW-Shorten-3.04/t/00load_a.t000444001750001750 34212205364257 15652 0ustar00dcrossdcross000000000000use Test::More tests => 3; # Basic test of 'does the module load, damnit!' BEGIN { use_ok 'WWW::Shorten::Metamark' } ok( exists $::{'makeashorterlink'}, 'shorter exists'); ok( exists $::{'makealongerlink'}, 'longer exists'); WWW-Shorten-3.04/t/00load_b.t000444001750001750 34412205364257 15655 0ustar00dcrossdcross000000000000use Test::More tests => 3; # Basic test of 'does the module load, damnit!' BEGIN { use_ok 'WWW::Shorten', 'Metamark' } ok( exists $::{'makeashorterlink'}, 'shorter exists'); ok( exists $::{'makealongerlink'}, 'longer exists'); WWW-Shorten-3.04/t/linkz.t000444001750001750 112112205364257 15436 0ustar00dcrossdcross000000000000use Test::More tests => 6; BEGIN { use_ok WWW::Shorten::Linkz }; my $url = 'http://www.bbc.co.uk/cult/doctorwho/ebooks/lungbarrow/index.shtml'; my $re = qr{ ^ http:// lin\.kz / \? (\w+) $ }x; SKIP: { skip 'lin.kz seems to be having trouble at the moment', 5; my $shortened; like(($shortened = makeashorterlink($url)), $re, 'make it shorter'); is(makealongerlink($shortened), $url, 'make it longer'); my ($code) = $shortened =~ $re; is (makealongerlink($code), $url, 'make it longer by Id'); eval { makeashorterlink() }; ok($@); eval { makealongerlink() }; ok($@); } WWW-Shorten-3.04/t/00noexp.t000444001750001750 24612205364257 15567 0ustar00dcrossdcross000000000000use Test::More tests => 1; # Basic test of 'does the module load, damnit!' use WWW::Shorten::Metamark; eval { WWW::Shorten::Metamark->import(':invalid') }; ok($@); WWW-Shorten-3.04/bin000755001750001750 012205364257 14277 5ustar00dcrossdcross000000000000WWW-Shorten-3.04/bin/shorten000555001750001750 630712205364257 16052 0ustar00dcrossdcross000000000000#!/usr/bin/perl -w use strict; use Getopt::Long; my %args; GetOptions(\%args, 'service=s'); # Determine our service, default is Metamark for no real reason my $config; # eval in case we don't have Config::Auto installed eval 'use Config::Auto 0.04'; unless ($@) { # eval in case we don't have a config file $config = eval 'Config::Auto::parse()'; } my $service = $args{service} || $ENV{SHORTEN_SERVICE} || $config->{service} || 'Metamark'; $service = "WWW::Shorten::$service"; # Import it eval "require $service"; if ($@) { die "Invalid service in your configuration.\n"; } $service->import('makeashorterlink'); # Get argument die "No URL specified!\n" unless @ARGV; my $url = $ARGV[0]; $url = "http://$url" unless $url =~ m[^\w+://]; # Convert my $out = eval 'makeashorterlink( $url )'; $out = "Error" if $@ or not defined $out; # Output print "$out\n"; __END__ =head1 NAME shorten - CLI program to demonstrate use of WWW::Shorten =head1 SYNOPSIS # Default shortening service is Metamark $ shorten books.perl.org/book/171 http://xrl.us/dv8 # Change with an environment variable $ SHORTEN_SERVICE=TinyURL shorten books.perl.org/book/171 http://tinyurl.com/ye7gjf4 # Change with command line option $ shorten --service=TinyURL books.perl.org/book/171 http://tinyurl.com/ye7gjf4 # Change using config file $ cat ~/.shortenrc service = TinyURL $ shorten books.perl.org/book/171 http://tinyurl.com/ye7gjf4 =head1 CONFIGURATION The service used can be controlled in various ways. The program will use the first of the following values that it finds: =over 4 =item * The value of the C<--service> command line option. =item * The value of the C environment variable. =item * The value of the C option from the configuration file (see below). =item * If none of the above options is found, the program defaults to using Metamark. =back =head1 CONFIGURATION FILE As we use the C module for configuration, shorten's fairly flexible when it comes to format. Configuration will be found in whichever of the following files comes first. shortenconfig ~/shortenconfig /etc/shortenconfig shorten.config ~/shorten.config /etc/shorten.config shortenrc ~/shortenrc /etc/shortenrc .shortenrc ~/.shortenrc /etc/.shortenrc Generally, I use the format: service = MakeAShorterLink which is simple and works. C is the only configuration keyword at present. Its value should be a correctly capitalized service name as per L's documentation. =head1 BUGS, REQUESTS, COMMENTS Please report any requests, suggestions or bugs via the system at L, or email Ebug-WWW-Shorten@rt.cpan.orgE. This makes it much easier for me to track things and thus means your problem is less likely to be neglected. =head1 LICENSE AND COPYRIGHT Copyright E Magnum Solutions Ltd, 2002 - 2010. All rights reserved. This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =head1 AUTHOR Dave Cross , taking over from Iain Truskett =head1 SEE ALSO L =cut