Update of /cvsroot/sandweb/sandweb/lib/SandWeb In directory sc8-pr-cvs1:/tmp/cvs-serv15829/SandWeb Modified Files: Auth.pm Browse.pm Config.pm Diff.pm File.pm Log.pm Repository.pm Security.pm Shell.pm UI.pm Log Message: beginning of POD docs Index: Auth.pm =================================================================== RCS file: /cvsroot/sandweb/sandweb/lib/SandWeb/Auth.pm,v retrieving revision 1.22 retrieving revision 1.23 diff -U2 -r1.22 -r1.23 --- Auth.pm 19 Jun 2002 07:08:59 -0000 1.22 +++ Auth.pm 5 Jan 2003 08:59:07 -0000 1.23 @@ -1,7 +1,15 @@ #lib/SandWeb/Auth.pm # -#This class handles logins using modules. A module will return true if the user -#is authentic, false if not. -# + +=pod +=head1 + +SandWeb::Auth + +This class handles logins using modules. A module will return true if the user +is authentic, false if not. + +=cut + # SandWeb (Web-based VCS client) # Index: Browse.pm =================================================================== RCS file: /cvsroot/sandweb/sandweb/lib/SandWeb/Browse.pm,v retrieving revision 1.79 retrieving revision 1.80 diff -U2 -r1.79 -r1.80 --- Browse.pm 26 Aug 2002 06:59:47 -0000 1.79 +++ Browse.pm 5 Jan 2003 08:59:07 -0000 1.80 @@ -1,12 +1,21 @@ #lib/SandWeb/Browse.pm # -#This class handles all filesystem and sandbox browsing functionality. It -#can show the user a list of files, allow the user to perform abitrary -#actions on any number of files, and allows you to view the contents of -#specific files. -# -#All filesystem and VCS operations are handled through a generic tool_bar, -#which is displayed in the UI. All UI is handled through the SandWeb::UI -#class. + +=pod +=head1 + +SandWeb::Browse + +This class handles all filesystem and sandbox browsing functionality. It +can show the user a list of files, allow the user to perform abitrary +actions on any number of files, and allows you to view the contents of +specific files. + +All filesystem and VCS operations are handled through a generic tool_bar, +which is displayed in the UI. All UI is handled through the SandWeb::UI +class. + +=cut + # # SandWeb (Web-based VCS client) Index: Config.pm =================================================================== RCS file: /cvsroot/sandweb/sandweb/lib/SandWeb/Config.pm,v retrieving revision 1.32 retrieving revision 1.33 diff -U2 -r1.32 -r1.33 --- Config.pm 6 Nov 2002 05:17:22 -0000 1.32 +++ Config.pm 5 Jan 2003 08:59:07 -0000 1.33 @@ -1,7 +1,15 @@ # Config class for SandWeb # -# This class just load in the XML config file, blesses it, and returns the -# object reference. Simply a Config loading class. -# + +=pod +=head1 + +SandWeb::Config + +This class just loads in the XML config file, blesses it, and returns the +object reference. Simply a Config loading class. + +=cut + # # SandWeb (Web-based VCS client) @@ -25,8 +33,29 @@ # +=head1 + +part of the SandWeb::Config package + +=cut + package SandWeb::Config; +=head1 + +uses XML::Simple + +=cut + use XML::Simple; +=head1 + +Methods + +new + instantiates a new object + +=cut + sub new { my $class = shift; @@ -80,7 +109,14 @@ } +=head1 + +manage_data_structure + + make sure data structure containing repositories is consistent + +=cut + sub manage_data_structure { my $self = shift; - # make sure data structure containing repositories is consistent if ( ($self->{'repo'}->{'type'}) && (ref(\$self->{'repo'}->{'type'}) eq 'SCALAR')) { @@ -111,5 +147,12 @@ # -# returns users full name +=head1 + +get_full_name + + returns users full name + +=cut + sub get_full_name { my $self = shift; @@ -117,5 +160,12 @@ } -# returns whether user wants to confirm each file deletion +=head1 + +get_confirm_delete + + returns whether user wants to confirm each file deletion + +=cut + sub get_confirm_delete { my $self = shift; @@ -129,5 +179,12 @@ # -# write config file for user preferences +=head1 + +write_preferences_config + + write config file for user preferences + +=cut + sub write_preferences_config { my $self = shift; @@ -150,6 +207,11 @@ } +=head1 + +get_repo_list + + returns list of subscribed repositories +=cut -# returns list of subscribed repositories sub get_repo_list { my $self = shift; @@ -157,8 +219,14 @@ } -# returns true if repository exists, 0 if not. -# -# repo = name of repository to check for -# +=head1 + +repository_exists + + returns true if repository exists, 0 if not. + + repo = name of repository to check for + +=cut + sub repository_exists { my $self = shift; @@ -175,5 +243,12 @@ } -# create new repository +=head1 + +create_repo + + create new repository + +=cut + sub create_repo { my $self = shift; @@ -203,5 +278,12 @@ } -# update existing repository +=head1 + +update_repo + + update existing repository + +=cut + sub update_repo { my $self = shift; @@ -230,5 +312,12 @@ } -# delete existing repository +=head + +delete_repo + + delete existing repository + +=cut + sub delete_repo { my $self = shift; @@ -238,5 +327,11 @@ } -# get/set repo_server +=head + +get_repo_server + + get repository servername +=cut + sub get_repo_server { my $self = shift; @@ -249,4 +344,12 @@ } } + +=head + +set_repo_server + + set repository servername +=cut + sub set_repo_server { my $self = shift; @@ -261,5 +364,12 @@ } } -# get/set repo_username + +=head + +get_repo_username + + get repository username +=cut + sub get_repo_username { my $self = shift; @@ -272,4 +382,12 @@ } } + +=head + +set_repo_server + + set repository username +=cut + sub set_repo_username { my $self = shift; @@ -284,5 +402,13 @@ } } -# get/set repo_password + +=head1 + +get_repo_password + + get repository password + +=cut + sub get_repo_password { my $self = shift; @@ -295,4 +421,13 @@ } } + +=head1 + +set_repo_password + + set repository password + +=cut + sub set_repo_password { my $self = shift; @@ -307,5 +442,13 @@ } } -# get/set whether we should remember repo password + +=head1 + +get_rememer_repo_password + + get whether we should remember repo password + +=cut + sub get_remember_repo_password { my $self = shift; @@ -318,4 +461,13 @@ } } + +=head1 + +set_rememer_repo_password + + set whether we should remember repo password + +=cut + sub set_remember_repo_password { my $self = shift; @@ -330,5 +482,13 @@ } } -# get/set repo_connection + +=head1 + +get_repo_connection + + get the type of repository connection ( ssh,local,pserver,etc ) + +=cut + sub get_repo_connection { my $self = shift; @@ -341,4 +501,13 @@ } } + +=head1 + +set_repo_connection + + set the type of repository connection ( ssh,local,pserver,etc ) + +=cut + sub set_repo_connection { my $self = shift; @@ -353,5 +522,13 @@ } } -# get/set repo_type + +=head1 + +get_repo_type + + set the type of repository ( cvs,svn,rsh,etc ) + +=cut + sub get_repo_type { my $self = shift; @@ -364,4 +541,13 @@ } } + +=head1 + +set_repo_type + + set the type of repository ( cvs,svn,rsh,etc ) + +=cut + sub set_repo_type { my $self = shift; @@ -376,5 +562,13 @@ } } -# get/set repo_root + +=head1 + +get_repo_root + + get the root of the repository + +=cut + sub get_repo_root { my $self = shift; @@ -387,4 +581,13 @@ } } + +=head1 + +set_repo_root + + set the root of the repository + +=cut + sub set_repo_root { my $self = shift; @@ -410,9 +613,15 @@ -# returns list of subscribed modules -# args: -# -# repo = name of repository to get list of subscribed modules. -# +=head1 + +get_module_list + + returns list of subscribed modules + + args: + repo = name of repository to get list of subscribed modules. + +=cut + sub get_module_list { my $self = shift; @@ -426,8 +635,14 @@ -# returns true if module exists, 0 if not. -# -# module = name of module to check for -# +=head1 + +module_exists + + returns true if module exists, 0 if not. + + module = name of module to check for + +=cut + sub module_exists { my $self = shift; @@ -445,4 +660,12 @@ } +=head1 + +add_module + + adds a module to the config file + +=cut + sub add_module { my $self = shift; @@ -472,4 +695,12 @@ } +=head1 + +update_module + + updates information on a module + +=cut + sub update_module { my $self = shift; @@ -492,4 +723,12 @@ } +=head1 + +delete_module + + deletes a module + +=cut + sub delete_module { my $self = shift; @@ -501,4 +740,12 @@ delete $self->{'repo'}->{$repo}->{'module'}->{$module}; } + +=head1 + +get_module_description + + gets the description of a stored module + +=cut sub get_module_description { Index: Diff.pm =================================================================== RCS file: /cvsroot/sandweb/sandweb/lib/SandWeb/Diff.pm,v retrieving revision 1.9 retrieving revision 1.10 diff -U2 -r1.9 -r1.10 --- Diff.pm 5 Sep 2002 02:07:53 -0000 1.9 +++ Diff.pm 5 Jan 2003 08:59:07 -0000 1.10 @@ -1,10 +1,17 @@ #SandWeb Diff Class # -#This class will eventually implement "diff" functionality for SandWeb. This -#will give us VCS-independant formatting of diffs, and will also give us the -#ability to do nicely-formatted, side-by-side colorized diffs. -# -#At the moment, all this class does is colorize any "unified format" diff -#given to it. +=pod + +SandWed::Diff + +This class will eventually implement "diff" functionality for SandWeb. This +will give us VCS-independant formatting of diffs, and will also give us the +ability to do nicely-formatted, side-by-side colorized diffs. + +At the moment, all this class does is colorize any "unified format" diff +given to it. + +=cut + # # SandWeb (Web-based VCS client) @@ -28,6 +35,23 @@ # +=head1 + +part of the SandWeb::Diff package + +=cut + package SandWeb::Diff; +=head1 + +Modules + + +new + + instantiates a new object + +=cut + sub new { my $class = shift; @@ -42,4 +66,11 @@ return $self; } + +=head1 + +colored_diff + returns an HTML-colorized output of the difference between two files + +=cut sub colored_diff { Index: File.pm =================================================================== RCS file: /cvsroot/sandweb/sandweb/lib/SandWeb/File.pm,v retrieving revision 1.60 retrieving revision 1.61 diff -U2 -r1.60 -r1.61 --- File.pm 13 Aug 2002 23:19:27 -0000 1.60 +++ File.pm 5 Jan 2003 08:59:07 -0000 1.61 @@ -1,8 +1,17 @@ #lib/SandWeb/File.pm # -#This class handles all file viewing and operations. If any class wants -#to view the contents of a file or directory, or perform a file action -#such as delete, rename, create, etc. then it just needs to create a File -#object and call the appropriate File method. + +=pod +=head1 + +SandWeb::File + +This class handles all file viewing and operations. If any class wants +to view the contents of a file or directory, or perform a file action +such as delete, rename, create, etc. then it just needs to create a File +object and call the appropriate File method. + +=cut + # # SandWeb (Web-based VCS client) @@ -26,9 +35,32 @@ # +=head1 + +part of the SandWeb::File class + +=cut + package SandWeb::File; +=head1 + +uses SandWeb::File::Unix + +=cut + # file handling module(s) use SandWeb::File::Unix; +=head1 + +Modules + + +new + + instantiates a new object + +=cut + sub new { my $class = shift; @@ -61,4 +93,12 @@ } +=head1 + +get_owner + + returns the owner of the current file + +=cut + sub get_owner { my $self = shift; @@ -66,4 +106,12 @@ } +=head1 + +get_group + + returns the group ownership of the current file + +=cut + sub get_group { my $self = shift; @@ -71,4 +119,12 @@ } +=head1 + +get_filename + + returns the name of the current file + +=cut + sub get_filename { my $self = shift; @@ -76,4 +132,12 @@ } +=head1 + +get_location + + returns the location (directory) of the current file + +=cut + sub get_location { my $self = shift; @@ -81,4 +145,12 @@ } +=head1 + +get_permissions + + returns the permissions of the current file + +=cut + sub get_permissions { my $self = shift; @@ -86,4 +158,12 @@ } +=head1 + +get_file_type + + returns the type of the current file + +=cut + sub get_file_type { my $self = shift; @@ -103,4 +183,12 @@ } +=head1 + +get_mime_type + + returns the mime type of the current file + +=cut + sub get_mime_type { my $self = shift; @@ -124,4 +212,12 @@ } +=head1 + +get_size + + returns the size of the current file + +=cut + sub get_size { my $self = shift; @@ -129,4 +225,12 @@ } +=head1 + +get_age + + returns the age of the current file + +=cut + sub get_age { my $self = shift; @@ -134,4 +238,12 @@ } +=head1 + +upload + + receives an upload of the current file + +=cut + sub upload { my $self = shift; @@ -153,4 +265,12 @@ } +=head1 + +download + + sends the current file ( for downloading ) + +=cut + sub download { my $self = shift; @@ -170,4 +290,12 @@ } +=head1 + +exists + + returns a 1 if the file exists, 0 if not + +=cut + sub exists { my $self = shift; @@ -185,4 +313,12 @@ } +=head1 + +create_file + + creates a file at the current location with the current filename + +=cut + sub create_file { my $self = shift; @@ -203,4 +339,12 @@ } +=head1 + +create_folder + + creates a folder at the current location with the current filename + +=cut + sub create_folder { my $self = shift; @@ -219,4 +363,12 @@ } +=head1 + +delete + + deletes the current file + +=cut + sub delete { my $self = shift; @@ -236,4 +388,12 @@ } +=head1 + +delete_folder + + deletes the current folder + +=cut + sub delete_folder { my $self = shift; @@ -255,4 +415,12 @@ } +=head1 + +copy + + copies the current file + +=cut + sub copy { my $self = shift; @@ -273,4 +441,12 @@ } +=head1 + +rename + + renames the current file + +=cut + sub rename { my $self = shift; @@ -291,4 +467,12 @@ } +=head1 + +file_read + + returns the contents of the current file + +=cut + sub file_read { my $self = shift; @@ -307,4 +491,12 @@ } +=head1 + +file_write + + writes out contents to the current file + +=cut + sub file_write { my $self = shift; @@ -324,4 +516,12 @@ return $module->file_write(contents => $contents); } + +=head1 + +get_file_commands + + returns all commands that this object supports + +=cut sub get_file_commands { Index: Log.pm =================================================================== RCS file: /cvsroot/sandweb/sandweb/lib/SandWeb/Log.pm,v retrieving revision 1.12 retrieving revision 1.13 diff -U2 -r1.12 -r1.13 --- Log.pm 19 Jun 2002 07:12:52 -0000 1.12 +++ Log.pm 5 Jan 2003 08:59:07 -0000 1.13 @@ -1,6 +1,12 @@ # SandWeb logging facility # -# This class allows us to have a standardized method for logging and debugging. -# + +=pod +=head1 + +This class allows us to have a standardized method for logging and debugging. + +=cut + # SandWeb (Web-based VCS client) # @@ -23,6 +29,23 @@ # +=head1 + +part of the SandWeb::Log package + +=cut + package SandWeb::Log; +=head1 + +Methods + + +new + + instantiates a new object + +=cut + sub new { my $class = shift; @@ -41,4 +64,12 @@ } +=head1 + +standard + + logs with "standard" severity + +=cut + sub standard { my ($self, $msg) = @_; @@ -49,4 +80,12 @@ } +=head1 + +debug + + logs with "debug" severity + +=cut + sub debug { my ($self, $msg) = @_; @@ -64,4 +103,12 @@ } +=head1 + +error + + logs with "error" severity + +=cut + sub error { my ($self, $msg) = @_; @@ -71,4 +118,12 @@ return 1; } + +=head1 + +get_debug_msgs + + returns the debug messages + +=cut sub get_debug_msgs { Index: Repository.pm =================================================================== RCS file: /cvsroot/sandweb/sandweb/lib/SandWeb/Repository.pm,v retrieving revision 1.47 retrieving revision 1.48 diff -U2 -r1.47 -r1.48 --- Repository.pm 7 Nov 2002 08:01:06 -0000 1.47 +++ Repository.pm 5 Jan 2003 08:59:07 -0000 1.48 @@ -1,8 +1,17 @@ #lib/SandWeb/Repository.pm # -#This class abstracts VCS functionality. It takes high-level VCS operations, -#and decides what method(s) to call in it's VCS-specific subclasses ( such -#as SandWeb::Repository::cvs ). It is up to the subclass to translate the -#high-level commands into something each VCS can use directly. + +=pod +=head1 + +SandWeb::Repository + +This class abstracts VCS functionality. It takes high-level VCS operations, +and decides what method(s) to call in it's VCS-specific subclasses ( such +as SandWeb::Repository::cvs ). It is up to the subclass to translate the +high-level commands into something each VCS can use directly. + +=cut + # # SandWeb (Web-based VCS client) @@ -26,6 +35,30 @@ # +=head1 + +part of the SandWeb::Repository package + +=cut + package SandWeb::Repository; + +=head1 + +uses SandWeb::Repository::cvs + +=cut + use SandWeb::Repository::cvs; + +=head1 + +Methods + + +new + + instantiates a new object + +=cut sub new { Index: Security.pm =================================================================== RCS file: /cvsroot/sandweb/sandweb/lib/SandWeb/Security.pm,v retrieving revision 1.1 retrieving revision 1.2 diff -U2 -r1.1 -r1.2 --- Security.pm 26 Aug 2002 06:59:47 -0000 1.1 +++ Security.pm 5 Jan 2003 08:59:07 -0000 1.2 @@ -1,5 +1,15 @@ #lib/SandWeb/Security.pm # -# This class has methods to handle common perl/cgi security problems. + +=pod +=head1 + +SandWeb::Security + +This class has methods to handle common perl/cgi security problems. + + +=cut + # # SandWeb (Web-based VCS client) @@ -23,6 +33,20 @@ # +=head1 + +part of the SandWeb::Security package + +=cut + package SandWeb::Security; +=head1 + +new + + instantiates a new object + +=cut + sub new { my $class = shift; @@ -32,4 +56,12 @@ } +=head1 + +path + + looks for and corrects common security problems with Unix directories + +=cut + sub path { my $self = shift; @@ -47,4 +79,13 @@ return $filename; } + +=head1 + +shell + + looks for and corrects common security problems with + calling to the Unix shell + +=cut sub shell { Index: Shell.pm =================================================================== RCS file: /cvsroot/sandweb/sandweb/lib/SandWeb/Shell.pm,v retrieving revision 1.22 retrieving revision 1.23 diff -U2 -r1.22 -r1.23 --- Shell.pm 31 Dec 2002 06:31:12 -0000 1.22 +++ Shell.pm 5 Jan 2003 08:59:07 -0000 1.23 @@ -1,8 +1,17 @@ #lib/SandWeb/Shell # -#This class makes any and all calls to the operating system shell. It has -#one public method, execute, which takes a command parameter. Shell is -#capable of understand SandWeb-specific needs, such as running a command -#as a specific Unix user, or authenticating to a VCS system like CVS. + +=pod +=head1 + +SandWeb::Shell + +This class makes any and all calls to the operating system shell. It has +one public method, execute, which takes a command parameter. Shell is +capable of understand SandWeb-specific needs, such as running a command +as a specific Unix user, or authenticating to a VCS system like CVS. + +=cut + # # SandWeb (Web-based VCS client) @@ -26,6 +35,18 @@ # +=head1 + +part of the SandWeb::Shell package + +=cut + package SandWeb::Shell; +=head1 + +uses SandWeb::File + +=cut + use SandWeb::File; @@ -37,4 +58,15 @@ my $timeout = '300'; +=head + +Methods + + +new + + instantiates a new object + +=cut + sub new { my $class = shift; @@ -88,4 +120,12 @@ } +=head1 + +execute + + executes a given command + +=cut + sub execute { my $self = shift; @@ -262,4 +302,12 @@ return %return; } + +=head1 + +pipe + + opens a pipe to a file + +=cut sub pipe { Index: UI.pm =================================================================== RCS file: /cvsroot/sandweb/sandweb/lib/SandWeb/UI.pm,v retrieving revision 1.37 retrieving revision 1.38 diff -U2 -r1.37 -r1.38 --- UI.pm 13 Aug 2002 03:22:02 -0000 1.37 +++ UI.pm 5 Jan 2003 08:59:07 -0000 1.38 @@ -1,5 +1,12 @@ # SandWeb User Interface Class # -# This class is currently a front-end to our templating system, HTML::Template + +=pod +=head1 + +This class is currently a front-end to our templating system + +=cut + # # SandWeb (Web-based VCS client) @@ -23,8 +30,33 @@ # +=head1 + +part of the SandWeb::UI package + +=cut + package SandWeb::UI; + +=head1 + +uses HTML::Template + +=cut + use HTML::Template; + +=head1 + +Methods + + +new + + instantiates a new object + +=cut + sub new { my $class = shift; @@ -42,4 +74,12 @@ } +=head1 + +print_screen + + prints out HTML + +=cut + sub print_screen { my $self = shift; @@ -85,4 +125,12 @@ } +=head1 + +print_popup + + prints an HTML "pop-up" window + +=cut + sub print_popup { my $self = shift; @@ -124,4 +172,12 @@ } +=head1 + +get_menu_bar + + gets the "menu bar" part of the HTML page + +=cut + sub get_menu_bar { my $self = shift; @@ -142,4 +198,11 @@ } +=head1 + +get_menu + + get the "menu" part of the HTML template + +=cut sub get_menu { @@ -159,4 +222,12 @@ return join('', @contents); } + +=head1 + +get_javascript + + gets javascript content for the HTML template (if any) + +=cut sub get_javascript { |