NAME

001-torrent-info.pl - Demonstration of using a standalone Net::BitTorrent::Torrent object to gather information

Description

This is a demonstration of how standalone Net::BitTorrent::Torrent objects can be created and used to gather information from a .torrent file.

Synopsis

001-torrent-info.pl

Lowdown

This section only makes sense when you view the source.

Line 6

Returns a new Net::BitTorrent::Torrent object. Created this way, (without a 'Client' parameter) the new object is not loaded into a parent Net::BitTorrent client.

You may use any of the arguments listed in Net::BitTorrent::Torrent's constructor. If there's a problem loading the .torrent, an error will (probably) be Carped by Net::BitTorrent::Torrent.

Line 8

Calls the debugging method as_string just to give you a rundown of what can be parsed from the file.

Line 9

Prints a dump of the .torrent file's metadata.

Line 10

Prints a list of the .torrent's files. This line also uses the path method from Net::BitTorrent::Torrent::File.

See Also

Please see Net::BitTorrent::Torrent's documentation for a list of methods and accessors.

Author

Sanko Robinson <sanko@cpan.org> - http://sankorobinson.com/

CPAN ID: SANKO

License and Legal

Copyright (C) 2008-2009 by Sanko Robinson <sanko@cpan.org>

This program is free software; you can redistribute it and/or modify it under the terms of The Artistic License 2.0. See the LICENSE file included with this distribution or http://www.perlfoundation.org/artistic_license_2_0. For clarification, see http://www.perlfoundation.org/artistic_2_0_notes.

When separated from the distribution, all POD documentation is covered by the Creative Commons Attribution-Share Alike 3.0 License. See http://creativecommons.org/licenses/by-sa/3.0/us/legalcode. For clarification, see http://creativecommons.org/licenses/by-sa/3.0/us/.

Neither this module nor the Author is affiliated with BitTorrent, Inc.