POD fixes (PodChecker.t)

This commit is contained in:
Wouter van Oijen 2006-07-13 12:30:47 +00:00
parent 2a929b83bd
commit fe9e46336d
4 changed files with 46 additions and 36 deletions

View file

@ -73,7 +73,9 @@ sub config {
Prints out debug information if debug is enabled. Prints out debug information if debug is enabled.
=head3 =head3 output
The debug message to be printed if debug is enabled.
=cut =cut
@ -92,7 +94,9 @@ sub debug {
Prints out error information. Prints out error information.
=head3 =head3 output
The error message to be printed if debug is enabled.
=cut =cut
@ -211,4 +215,3 @@ sub runTests {
1; 1;

View file

@ -32,7 +32,7 @@ Initializes the scheduler.
=cut =cut
sub _start { sub _start {
my ( $kernel, $self, $publicEvents) = @_[ KERNEL, OBJECT, ARG0 ]; my ($kernel, $self, $publicEvents) = @_[ KERNEL, OBJECT, ARG0 ];
$self->debug("Starting Spectre scheduler."); $self->debug("Starting Spectre scheduler.");
my $serviceName = "cron"; my $serviceName = "cron";
$kernel->alias_set($serviceName); $kernel->alias_set($serviceName);
@ -60,8 +60,6 @@ sub _stop {
undef $self; undef $self;
} }
#------------------------------------------------------------------- #-------------------------------------------------------------------
=head2 addJob ( params ) =head2 addJob ( params )
@ -154,10 +152,9 @@ sub addJob {
}; };
} }
#------------------------------------------------------------------- #-------------------------------------------------------------------
=head2 checkSchedule ( job, now ) =head2 checkSchedule ( jobId, now )
Compares a schedule with the current time and kicks off an event if necessary. This method should only ever need to be called by checkSchedules(). Compares a schedule with the current time and kicks off an event if necessary. This method should only ever need to be called by checkSchedules().
@ -172,12 +169,12 @@ A DateTime object representing the time to compare the schedule with.
=cut =cut
sub checkSchedule { sub checkSchedule {
my ($kernel, $self, $id, $now) = @_[KERNEL, OBJECT, ARG0, ARG1]; my ($kernel, $self, $jobId, $now) = @_[KERNEL, OBJECT, ARG0, ARG1];
$self->debug("Checking schedule ".$id." against the current time."); $self->debug("Checking schedule ".$jobId." against the current time.");
my $cron = DateTime::Cron::Simple->new($self->getJob($id)->{schedule}); my $cron = DateTime::Cron::Simple->new($self->getJob($jobId)->{schedule});
if ($cron->validate_time($now)) { if ($cron->validate_time($now)) {
$self->debug("It's time to run ".$id.". Creating workflow instance."); $self->debug("It's time to run ".$jobId.". Creating workflow instance.");
$kernel->yield("runJob",$id); $kernel->yield("runJob",$jobId);
} }
} }
@ -199,7 +196,6 @@ sub checkSchedules {
$kernel->delay_set("checkSchedules",60); $kernel->delay_set("checkSchedules",60);
} }
#------------------------------------------------------------------- #-------------------------------------------------------------------
=head2 config =head2 config
@ -219,7 +215,9 @@ sub config {
Prints out debug information if debug is enabled. Prints out debug information if debug is enabled.
=head3 =head3 output
The debug message to be printed if debug is enabled.
=cut =cut
@ -255,14 +253,15 @@ sub deleteJob {
delete $self->{_jobs}{$id}; delete $self->{_jobs}{$id};
} }
#------------------------------------------------------------------- #-------------------------------------------------------------------
=head2 error ( output ) =head2 error ( output )
Prints out error information if debug is enabled. Prints out error information if debug is enabled.
=head3 =head3 output
The error message to be printed if debug is enabled.
=cut =cut
@ -373,7 +372,6 @@ sub new {
); );
} }
#------------------------------------------------------------------- #-------------------------------------------------------------------
=head2 runJob ( ) =head2 runJob ( )
@ -456,4 +454,3 @@ sub runJobResponse {
1; 1;

View file

@ -57,8 +57,6 @@ sub _stop {
undef $self; undef $self;
} }
#------------------------------------------------------------------- #-------------------------------------------------------------------
=head2 addInstance ( params ) =head2 addInstance ( params )
@ -73,11 +71,11 @@ A hash reference containing important information about the workflow instance to
The host and domain of the site this instance belongs to. The host and domain of the site this instance belongs to.
=head3 instanceId =head4 instanceId
The unqiue id for this workflow instance. The unqiue id for this workflow instance.
=head3 priority =head4 priority
The priority (1,2, or 3) that this instance should be run at. The priority (1,2, or 3) that this instance should be run at.
@ -134,7 +132,7 @@ sub checkInstances {
#------------------------------------------------------------------- #-------------------------------------------------------------------
=head2 config =head2 config ( )
Returns a reference to the config object. Returns a reference to the config object.
@ -167,7 +165,9 @@ sub countRunningInstances {
Prints out debug information if debug is enabled. Prints out debug information if debug is enabled.
=head3 =head3 output
The debug message to be printed if debug is enabled.
=cut =cut
@ -210,7 +210,9 @@ sub deleteInstance {
Prints out error information if debug is enabled. Prints out error information if debug is enabled.
=head3 =head3 output
The error message to be printed if debug is enabled.
=cut =cut
@ -439,7 +441,4 @@ sub workerResponse {
} }
1; 1;

View file

@ -38,7 +38,6 @@ These methods are available from this package:
=cut =cut
#------------------------------------------------------------------- #-------------------------------------------------------------------
=head2 getRequiredProfileFields ( session ) =head2 getRequiredProfileFields ( session )
@ -67,7 +66,7 @@ sub getRequiredProfileFields {
#------------------------------------------------------------------- #-------------------------------------------------------------------
=head2 isDuplicateEmail ( ) =head2 isDuplicateEmail ( email )
Checks the value of the email address passed in to see if it is Checks the value of the email address passed in to see if it is
duplicated in the system. Returns true of false. Will return false duplicated in the system. Returns true of false. Will return false
@ -89,7 +88,7 @@ sub isDuplicateEmail {
#------------------------------------------------------------------- #-------------------------------------------------------------------
=head2 saveProfileFields ( session, u, profile ) =head2 saveProfileFields ( session, user, profile )
Saves profile data to a user's profile. Does not validate any of the data. Saves profile data to a user's profile. Does not validate any of the data.
@ -117,6 +116,8 @@ sub saveProfileFields {
} }
} }
#-------------------------------------------------------------------
=head2 validateProfileData ( session ) =head2 validateProfileData ( session )
Validates profile data from the session form variables. Returns processed data, warnings Validates profile data from the session form variables. Returns processed data, warnings
@ -135,10 +136,10 @@ If the profile field is required, and the form field is blank, returns an error.
If the profile field label is "email", then checks for a duplicate email and returns a If the profile field label is "email", then checks for a duplicate email and returns a
warning if it is a duplicate. warning if it is a duplicate.
=back
=cut =cut
#-------------------------------------------------------------------
sub validateProfileData { sub validateProfileData {
my $session = shift; my $session = shift;
my %data = (); my %data = ();
@ -166,6 +167,8 @@ sub validateProfileData {
return (\%data, $error, $warning); return (\%data, $error, $warning);
} }
#-------------------------------------------------------------------
=head2 www_editProfile ( session ) =head2 www_editProfile ( session )
Provide a form where user profile data can be entered or edited. The subroutine Provide a form where user profile data can be entered or edited. The subroutine
@ -181,7 +184,6 @@ A reference to the current session.
=cut =cut
#-------------------------------------------------------------------
sub www_editProfile { sub www_editProfile {
my $session = shift; my $session = shift;
return WebGUI::Operation::Auth::www_auth($session,"init") if($session->user->userId eq '1'); return WebGUI::Operation::Auth::www_auth($session,"init") if($session->user->userId eq '1');
@ -231,6 +233,10 @@ object.
Returns the user to WebGUI::Operation::Auth::www_auth when done. Returns the user to WebGUI::Operation::Auth::www_auth when done.
=head3 session
A reference to the current session.
=cut =cut
sub www_editProfileSave { sub www_editProfileSave {
@ -255,6 +261,10 @@ Validates that the user requesting the profile data is allowed to see it.
Similarly to www_editProfile, this method is templated. The default template Similarly to www_editProfile, this method is templated. The default template
is PBtmpl0000000000000052. The template is not user selectable. is PBtmpl0000000000000052. The template is not user selectable.
=head3 session
A reference to the current session.
=cut =cut
sub www_viewProfile { sub www_viewProfile {
@ -290,4 +300,5 @@ sub www_viewProfile {
return $session->style->userStyle(WebGUI::Asset::Template->new($session,"PBtmpl0000000000000052")->process($vars)); return $session->style->userStyle(WebGUI::Asset::Template->new($session,"PBtmpl0000000000000052")->process($vars));
} }
1; 1;