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

View file

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

View file

@ -57,8 +57,6 @@ sub _stop {
undef $self;
}
#-------------------------------------------------------------------
=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.
=head3 instanceId
=head4 instanceId
The unqiue id for this workflow instance.
=head3 priority
=head4 priority
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.
@ -167,7 +165,9 @@ sub countRunningInstances {
Prints out debug information if debug is enabled.
=head3
=head3 output
The debug message to be printed if debug is enabled.
=cut
@ -210,7 +210,9 @@ sub deleteInstance {
Prints out error information if debug is enabled.
=head3
=head3 output
The error message to be printed if debug is enabled.
=cut
@ -439,7 +441,4 @@ sub workerResponse {
}
1;

View file

@ -38,7 +38,6 @@ These methods are available from this package:
=cut
#-------------------------------------------------------------------
=head2 getRequiredProfileFields ( session )
@ -52,7 +51,7 @@ The current WebGUI session object.
=cut
# Builds Extra form requirements for anonymous registration.
# Builds Extra form requirements for anonymous registration.
sub getRequiredProfileFields {
my $session = shift;
my @array;
@ -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
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.
@ -117,6 +116,8 @@ sub saveProfileFields {
}
}
#-------------------------------------------------------------------
=head2 validateProfileData ( session )
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
warning if it is a duplicate.
=back
=cut
#-------------------------------------------------------------------
sub validateProfileData {
my $session = shift;
my %data = ();
@ -166,6 +167,8 @@ sub validateProfileData {
return (\%data, $error, $warning);
}
#-------------------------------------------------------------------
=head2 www_editProfile ( session )
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
#-------------------------------------------------------------------
sub www_editProfile {
my $session = shift;
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.
=head3 session
A reference to the current session.
=cut
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
is PBtmpl0000000000000052. The template is not user selectable.
=head3 session
A reference to the current session.
=cut
sub www_viewProfile {
@ -290,4 +300,5 @@ sub www_viewProfile {
return $session->style->userStyle(WebGUI::Asset::Template->new($session,"PBtmpl0000000000000052")->process($vars));
}
1;