gitpan / www-nanoref Goto Github PK
View Code? Open in Web Editor NEWRead-only release history for WWW-NanoRef
Home Page: http://metacpan.org/release/WWW-NanoRef
Read-only release history for WWW-NanoRef
Home Page: http://metacpan.org/release/WWW-NanoRef
NAME WWW::NanoRef - Shorten URLs via nanoref.com SYNOPSIS use WWW::NanoRef; my $ref = WWW::NanoRef->new({ url => $destination_url }); my $short_url = $ref->get_short_url; # or my $url = $ref->get_subdomain_url('test'); DESCRIPTION This module uses the API published by nanoref.com to produce shortened URLs. So a destination URL like http://maps.yahoo.com/dd_result?newaddr=865+W+El+C amino+Real&taddr=2495+S+Delaware+St&csz=Sunnyvale% 2C+CA+94086&country=us&tcsz=San+Mateo%2C+CA+94403- 1902&tcountry=us becomes a shorter URL like http://nanoref.com/yahoo/_QhGlg or a short URL like this that you choose yourself: http://mymap.nanoref.com/ METHODS new(\%params) Creates a new object. The only key/value pair required is url, which is the destination URL you want the shortened URL to redirect to. Parameters: url The destination URL you want the shortened URL to redirect to. passwd The password you want to associated with the nanoref.com URL for viewing stats (see http://nanoref.com/ for details) when they are implemented. test If set to a true value, a nanoref.com URL will be generated, but will not be stored (and will not work). It is used for testing this module. get_short_url() Returns a shortened URL that will redirect to the destination URL passed to new() when creating the object. On error, undef is returned. get_subdomain_url($subdomain) Attempts to register a shortened URL with the given subdomain. E.g., my $short_url = $nano_ref->get_subdomain_url('test'); If 'test' has not already been registered, then http://test.nanoref.com/ will now redirect to the URL given to new(). Otherwise, $short_url will be undef. This corresponds to the "Choose your own" tab on http://nanoref.com/. get_error() Returns the error message, if any, from the server. DEPENDENCIES XML::Parser::Wrapper (which in turn depends on XML::Parser) LWP AUTHOR Don Owens <[email protected]> LICENSE AND COPYRIGHT Copyright (c) 2005 Don Owens <[email protected]>. All rights reserved. This is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic. 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. SEE ALSO http://nanoref.com/ VERSION 0.02
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.