[Bps-public-commit] Prophet branch, master, updated. db16cbf9378b2688b2cc87476befd2f09b23ac44

spang at bestpractical.com spang at bestpractical.com
Thu Jul 16 12:58:42 EDT 2009


The branch, master has been updated
       via  db16cbf9378b2688b2cc87476befd2f09b23ac44 (commit)
      from  aa63e50e604a0b02a4986747e185443a7eadaab8 (commit)

Summary of changes:
 lib/Prophet/App.pm |   58 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 58 insertions(+), 0 deletions(-)

- Log -----------------------------------------------------------------
commit db16cbf9378b2688b2cc87476befd2f09b23ac44
Author: Christine Spang <spang at mit.edu>
Date:   Thu Jul 16 17:48:41 2009 +0100

    I've been informed that pod-by-methods is preferred

diff --git a/lib/Prophet/App.pm b/lib/Prophet/App.pm
index c31e60e..416e0c0 100644
--- a/lib/Prophet/App.pm
+++ b/lib/Prophet/App.pm
@@ -46,23 +46,53 @@ has uuid_generator => (
 
 use constant DEFAULT_REPLICA_TYPE => 'prophet';
 
+=head1 NAME
+
+Prophet::App
+
+=head1 SYNOPSIS
+
+=head1 METHODS
+
+=head2 BUILD
+
+=cut
+
+=head2 default_replica_type
+
+Returns a string of the the default replica type for this application.
+
+=cut
+
 sub default_replica_type {
     my $self = shift;
     return $ENV{'PROPHET_REPLICA_TYPE'} || DEFAULT_REPLICA_TYPE;
 }
 
+=head2 require
+
+=cut
+
 sub require {
     my $self = shift;
     my $class = shift;
     $self->_require(module => $class);
 }
 
+=head2 try_to_require
+
+=cut
+
 sub try_to_require {
     my $self = shift;
     my $class = shift;
     $self->_require(module => $class, quiet => 1);
 }
 
+=head2 _require
+
+=cut
+
 sub _require {
     my $self = shift;
     my %args = ( module => undef, quiet => undef, @_);
@@ -106,6 +136,12 @@ sub _require {
     return 1;
 }
 
+=head2 already_required class
+
+Helper function to test whether a given class has already been require'd.
+
+=cut
+
 sub already_required {
     my ($self, $class) = @_;
 
@@ -155,6 +191,14 @@ sub setting {
 
 sub database_settings {} # XXX wants a better name
 
+
+=head3 log $MSG
+
+Logs the given message to C<STDERR> (but only if the C<PROPHET_DEBUG>
+environmental variable is set).
+
+=cut
+
 sub log_debug {
     my $self = shift;
     return unless ($ENV{'PROPHET_DEBUG'});
@@ -167,6 +211,12 @@ sub log {
     print STDERR $msg."\n";# if ($ENV{'PROPHET_DEBUG'});
 }
 
+=head2 log_fatal $MSG
+
+Logs the given message and dies with a stack trace.
+
+=cut
+
 sub log_fatal {
     my $self = shift;
 
@@ -184,6 +234,14 @@ sub current_user_email {
 
 }
 
+=head2 display_name_for_replica UUID
+
+Returns a "friendly" id for the replica with the given uuid. UUIDs are for
+computers, friendly names are for people. If no name is found, the friendly
+name is just the UUID.
+
+=cut
+
 # friendly names are replica subsections in the config file
 sub display_name_for_replica {
     my $self = shift;

-----------------------------------------------------------------------



More information about the Bps-public-commit mailing list