cvsuser     02/07/30 13:50:49

  Modified:    P5EEx/Blue/P5EEx/Blue Service.pm
  Log:
  added print() and dump() methods
  
  Revision  Changes    Path
  1.9       +53 -1     p5ee/P5EEx/Blue/P5EEx/Blue/Service.pm
  
  Index: Service.pm
  ===================================================================
  RCS file: /cvs/public/p5ee/P5EEx/Blue/P5EEx/Blue/Service.pm,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -w -r1.8 -r1.9
  --- Service.pm        18 Feb 2002 18:43:59 -0000      1.8
  +++ Service.pm        30 Jul 2002 20:50:49 -0000      1.9
  @@ -1,6 +1,6 @@
   
   #############################################################################
  -## $Id: Service.pm,v 1.8 2002/02/18 18:43:59 spadkins Exp $
  +## $Id: Service.pm,v 1.9 2002/07/30 20:50:49 spadkins Exp $
   #############################################################################
   
   package P5EEx::Blue::Service;
  @@ -110,6 +110,58 @@
   =cut
   
   sub service_type () { 'Service'; }
  +
  +#############################################################################
  +# dump()
  +#############################################################################
  +
  +=head2 dump()
  +
  +    * Signature: $perl = $service->dump();
  +    * Param:     void
  +    * Return:    $perl      text
  +    * Throws:    P5EEx::Blue::Exception
  +    * Since:     0.01
  +
  +    Sample Usage: 
  +
  +    $service = $context->repository();
  +    print $service->dump(), "\n";
  +
  +=cut
  +
  +use Data::Dumper;
  +
  +sub dump {
  +    my ($self) = @_;
  +    my $name = $self->service_type() . "__" . $self->{name};
  +    my $d = Data::Dumper->new([ $self ], [ $name ]);
  +    $d->Indent(1);
  +    return $d->Dump();
  +}
  +
  +#############################################################################
  +# print()
  +#############################################################################
  +
  +=head2 print()
  +
  +    * Signature: $service->print();
  +    * Param:     void
  +    * Return:    void
  +    * Throws:    P5EEx::Blue::Exception
  +    * Since:     0.01
  +
  +    Sample Usage: 
  +
  +    $service->print();
  +
  +=cut
  +
  +sub print {
  +    my $self = shift;
  +    print $self->dump();
  +}
   
   #############################################################################
   # PROTECTED METHODS
  
  
  


Reply via email to