[svn:p5ee] r7983 - p5ee/trunk/App-Context/lib/App

[email protected]
Newsgroups perl.cvs.p5ee
Message-ID <[email protected]>
Author: spadkins
Date: Thu Oct 26 06:18:21 2006
New Revision: 7983

Modified:
   p5ee/trunk/App-Context/lib/App/Service.pm

Log:
add content_description() to support UI timing

Modified: p5ee/trunk/App-Context/lib/App/Service.pm
==============================================================================
--- p5ee/trunk/App-Context/lib/App/Service.pm	(original)
+++ p5ee/trunk/App-Context/lib/App/Service.pm	Thu Oct 26 06:18:21 2006
@@ -170,6 +170,40 @@
 }
 
 #############################################################################
+# content_description()
+#############################################################################
+
+=head2 content_description()
+
+    * Signature: $content_description = $service->content_description();
+    * Param:     void
+    * Return:    $content_description   string
+    * Throws:    App::Exception
+    * Since:     0.01
+
+Provide a description of the content which is useful for diagnostic purposes
+(such as for the timing log implemented in App::Context::HTTP).
+
+This method can be overridden by an application-specific service such as a
+web application user interface widget to provide more useful information
+in the description.
+
+    Sample Usage: 
+
+    $content_description = $service->content_description();
+
+=cut
+
+sub content_description {
+    &App::sub_entry if ($App::trace);
+    my ($self) = @_;
+    my $class = ref($self);
+    my $content_description = "$class($self->{name})";
+    &App::sub_exit($content_description) if ($App::trace);
+    return($content_description);
+}
+
+#############################################################################
 # Method: internals()
 #############################################################################
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.