NAME
Net::Citadel::ToDo - To Do items for the Net::Citadel Perl extension.
TODO
General
Add a function for the MRTG command, possibly as a separate module like Net::Citadel::MRTG
since it should be in the Net::Citadel
namespace but does not require a login and therefore does not need the new
function in the main module.
Add a function for the INFO command, possibly as the function citadel_info
.
Add a ZIPFLAGS configuration item for dist/zipdist in Makefile.PL?
Add a note in the documenation about the Net::Citadel repository and home page at GitHub? Also include a refernce to where it is available at the gitpan
CPAN mirror at GitHub?
Contstants
Use the Readonly module instead of use constant
for the constants being defined in the module.
There are some numbers being used that are actually constants; change to using Readonly to define them for use in the code, unless there are other standard constants that can be used, like those for the flock operations.
When converting the user related constants, also move them up with the rest of the constants definitions.
Add POD documentation for the constants, inline with where they are defined so it also serves as documentation when looking at the source.
A NO_SUCH_USER
return code is mentioned in the command documentation (for the USER command, for instance,) but the module doesn't currently appear to define it.
Functions
Add an explicit return
line as necessary to those subroutines that do not have them.
Export some functions, at least using EXPORT_OK
? Perhaps for the ones that do require a login to run?
assert_room
function-
Is the
assert_room
command coming up with the correct floor information?Is the
assert_room
function sending the parameters for the CRE8 command properly? (There is a note in the code indicating an uncertainty about what should be sent.) - function
new
-
Add being able to set the port option; if not present, it would default to the standard Citadel port number (using the
CITADEL_PORT
constant). citadel_time
function-
The current
citadel_time
function only returns the first two parameters from the TIME command:1347624956|-14400
. The Citadel TIME command itself actually returns a line like this:200 1347625545|-14400|1|1347537300
, with the '200' being the OK code and the rest being the four fields that it returns. So as currently written, the function doesn't return the daylight savings time indication and the actual citadel server start information. Function first needs to be changed to at least return all parameters.Rewrite the
citadel_time
function to unpack the parameters that the TIME command returns when it is successful, and then return them to the calling program in a hash? Could also then return the hash with a key named 'error' or 'Error' if it is not successful. Update its POD to reflect the changes. citadel_echo
function-
It appears to test if what was sent was actually received back but doesn't explicitly return any indication one way or another; the function just croaks if there is no match. Add an explicit return of the value returned from the command? Or just return true for a normal exit?
Documentation
Add something like Net::Citadel::Tutorial for examples of the use and configuration of the module.
Testing
Change the names of the test floors and rooms to something like Test Floor
and Test Room
?
In the testing related to users, change to using the name TestUser.
Implement the testing for the retract_floor
function.
Update the testing for the citadel_time
function to at least check the number of parameters returned? Three of the parameters are Unix timestamps; validate those in some way? The fourth parameter being returned is a Boolean and is used to indicate Daylight Savings Time and should be a '0' or a '1'.
When testing for a floor, it looks for Main Floor
; that exists on a default install but may not be on an working system. Make it another configuration item, which if not configured would default to Main Floor
?
Separate the testing to: functions that do not require a log in, those that do require a log in, those that are read only, those that write to the server. Or use the separation given in the documentation for the different Sections for the commands?
Add a Testing
section of some sort to the configuration file?
SEE ALSO
L<Net::Citadel>
AUTHOR
Robert James Clay, <jame at rocasa.us>
COPYRIGHT AND LICENSE
Copyright 2012 Robert James Clay, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.