cvsuser     04/09/02 13:55:45

  Modified:    App-Context/lib/App Service.pm
  Log:
  added tracing
  
  Revision  Changes    Path
  1.6       +13 -3     p5ee/App-Context/lib/App/Service.pm
  
  Index: Service.pm
  ===================================================================
  RCS file: /cvs/public/p5ee/App-Context/lib/App/Service.pm,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -w -r1.5 -r1.6
  --- Service.pm        19 May 2003 17:41:12 -0000      1.5
  +++ Service.pm        2 Sep 2004 20:55:45 -0000       1.6
  @@ -1,6 +1,6 @@
   
   #############################################################################
  -## $Id: Service.pm,v 1.5 2003/05/19 17:41:12 spadkins Exp $
  +## $Id: Service.pm,v 1.6 2004/09/02 20:55:45 spadkins Exp $
   #############################################################################
   
   package App::Service;
  @@ -76,6 +76,7 @@
   =cut
   
   sub new {
  +    &App::sub_entry if ($App::trace);
       my $this = shift;
       my $class = ref($this) || $this;
       my ($self, $context, $type);
  @@ -88,6 +89,7 @@
       else {  # even number of args (
           $self = $context->service($type, "default", @_, "class", $class);
       }
  +    &App::sub_exit($self) if ($App::trace);
       return $self;
   }
   
  @@ -134,8 +136,11 @@
   =cut
   
   sub content {
  +    &App::sub_entry if ($App::trace);
       my $self = shift;
  -    $self->internals();
  +    my $content = $self->internals();
  +    &App::sub_exit($content) if ($App::trace);
  +    return($content);
   }
   
   #############################################################################
  @@ -157,7 +162,10 @@
   =cut
   
   sub content_type {
  -    'text/plain';
  +    &App::sub_entry if ($App::trace);
  +    my $content_type = 'text/plain';
  +    &App::sub_exit($content_type) if ($App::trace);
  +    return($content_type);
   }
   
   #############################################################################
  @@ -184,10 +192,12 @@
   =cut
   
   sub internals {
  +    &App::sub_entry if ($App::trace);
       my ($self) = @_;
       my %copy = %$self;
       delete $copy{context};
       delete $copy{dict};
  +    &App::sub_exit(\%copy) if ($App::trace);
       return \%copy;
   }
   
  
  
  

Reply via email to