NAME
Slackware::Slackget::Network::Connection::DEBUG - This class iimplements the debug:// protocol driver for Slackware::Slackget::Network::Connection
VERSION
Version 0.5
SYNOPSIS
This class implements the debug:// protocol driver for Slackware::Slackget::Network::Connection.
You can't use this class without the Slackware::Slackget::Network::Connection one.
This class was implemented for 2 main reasons :
* To help coding and debuging new protocol drivers
* As a tutorial on how to code a new driver.
You should always remember that this class do absolutly nothing !
All downloads are fake ones as well as the
CONSTRUCTOR
new
This class is not designed to be instanciate alone or used alone. You have to use the Slackware::Slackget::Network::Connection.
FUNCTIONS
__test_server
This method act as if it test the rapidity of a repository. It return a random number between 10 and 90.
Moreover it output a message on the standard output (STDOUT).
my $time = $self->test_server() ;
__get_file
Return the following string :
"This is a debug output from the Slackware::Slackget::Network::Connection::DEBUG network driver.\n"
If you want it to return an error, please set an extra data called 'debug-want-error', like that :
$connection->object_extra_data('debug-want-error', 1);
$connection->get_file('TEST.TXT');
You can use this method like any other connection driver's one :
my $file = $connection->get_file('PACKAGES.TXT') ;
It output some informations (protocol, host, path and remote file) on the standard output (STDOUT).
__fetch_file
Provide a
This method return a Slackware::Slackget::Status object with the following object declaration :
my $state = Slackware::Slackget::Status->new(codes => {
0 => "All goes well. Server said: $ret_code - ".status_message( $ret_code ),
1 => "Destination directory does not exist.\n",
2 => "Destination directory is not writable.\n",
3 => "Server error, you must choose the next host for this server. \nServer said: \nThis is a debug output from the Slackware::Slackget::Network::Connection::DEBUG network driver.",
});
This method is also affected by the 'debug-want-error' extra data (if set with a true value it will generate a download error event).
This method is also affected by the 'debug-want-success' extra data (if set with a true value, it will generate a download finished event)
The default behavior is to randomize the generated state.
AUTHOR
DUPUIS Arnaud, <a.dupuis at infinityperl.org>
BUGS
Please report any bugs or feature requests to bug-slackware-slackget-network-connection-debug at rt.cpan.org
, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Slackware-Slackget-Network-Connection-DEBUG. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
SUPPORT
You can find documentation for this module with the perldoc command.
perldoc Slackware::Slackget::Network::Connection::DEBUG
You can also look for information at:
Infinity Perl website
RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=Slackware-Slackget-Network-Connection-DEBUG
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/Slackware-Slackget-Network-Connection-DEBUG
CPAN Ratings
http://cpanratings.perl.org/d/Slackware-Slackget-Network-Connection-DEBUG
Search CPAN
http://search.cpan.org/dist/Slackware-Slackget-Network-Connection-DEBUG
ACKNOWLEDGEMENTS
COPYRIGHT & LICENSE
Copyright 2007 DUPUIS Arnaud, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.