cvs commit: p5ee/App-Context/lib/App Session.pm

[email protected] (Stephen Adkins)
Newsgroups perl.cvs.p5ee
Message-ID <[email protected]>
cvsuser     04/02/27 06:24:35

  Modified:    App-Context/lib/App Session.pm
  Log:
  rename trace_subs to trace
  
  Revision  Changes    Path
  1.5       +20 -20    p5ee/App-Context/lib/App/Session.pm
  
  Index: Session.pm
  ===================================================================
  RCS file: /cvs/public/p5ee/App-Context/lib/App/Session.pm,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -w -r1.4 -r1.5
  --- Session.pm	3 Dec 2003 16:16:59 -0000	1.4
  +++ Session.pm	27 Feb 2004 14:24:35 -0000	1.5
  @@ -1,6 +1,6 @@
   
   #############################################################################
  -## $Id: Session.pm,v 1.4 2003/12/03 16:16:59 spadkins Exp $
  +## $Id: Session.pm,v 1.5 2004/02/27 14:24:35 spadkins Exp $
   #############################################################################
   
   package App::Session;
  @@ -128,7 +128,7 @@
   =cut
   
   sub new {
  -    &App::sub_entry if ($App::trace_subs);
  +    &App::sub_entry if ($App::trace);
       my $this = shift;
       my $class = ref($this) || $this;
   
  @@ -137,7 +137,7 @@
   
       $self->_init(@_);  # allows a subclass to override this portion
   
  -    &App::sub_exit($self) if ($App::trace_subs);
  +    &App::sub_exit($self) if ($App::trace);
       return $self;
   }
   
  @@ -167,9 +167,9 @@
   =cut
   
   sub _init {
  -    &App::sub_entry if ($App::trace_subs);
  +    &App::sub_entry if ($App::trace);
       my $self = shift;
  -    &App::sub_exit() if ($App::trace_subs);
  +    &App::sub_exit() if ($App::trace);
   }
   
   #############################################################################
  @@ -213,7 +213,7 @@
   =cut
   
   sub get {
  -    &App::sub_entry if ($App::trace_subs);
  +    &App::sub_entry if ($App::trace);
       my ($self, $service, $name, $var, $default, $setdefault) = @_;
       if (!defined $name) {
           if ($service =~ /^([A-Z][^.]*)\.(.+)/) {
  @@ -278,10 +278,10 @@
           eval $perl;
           $self->add_message("eval [$perl]: $@") if ($@);
           $self->dbgprint("Session->get($service,$name,$var) (indexed) = [$value]")
  -            if ($P5EEx::Blue::DEBUG && $self->dbg(3));
  +            if ($App::DEBUG && $self->dbg(3));
       }
   
  -    &App::sub_exit($value) if ($App::trace_subs);
  +    &App::sub_exit($value) if ($App::trace);
       return $value;
   }
   
  @@ -317,7 +317,7 @@
   =cut
   
   sub set {
  -    &App::sub_entry if ($App::trace_subs);
  +    &App::sub_entry if ($App::trace);
       my ($self, $service, $name, $var, $value) = @_;
       if (!defined $value) {
           $value = $name;
  @@ -377,7 +377,7 @@
           $self->add_message("eval [$perl]: $@") if ($@);
       }
   
  -    &App::sub_exit() if ($App::trace_subs);
  +    &App::sub_exit() if ($App::trace);
   }
   
   #############################################################################
  @@ -408,10 +408,10 @@
   =cut
   
   sub default {
  -    &App::sub_entry if ($App::trace_subs);
  +    &App::sub_entry if ($App::trace);
       my ($self, $service, $name, $var, $value) = @_;
       $self->get($service, $name, $var, $value, 1);
  -    &App::sub_exit() if ($App::trace_subs);
  +    &App::sub_exit() if ($App::trace);
   }
   
   #############################################################################
  @@ -440,7 +440,7 @@
   =cut
   
   sub delete {
  -    &App::sub_entry if ($App::trace_subs);
  +    &App::sub_entry if ($App::trace);
       my ($self, $service, $name, $var) = @_;
       if (!defined $name) {
           if ($service =~ /^([A-Z][^.]*)\.(.+)/) {
  @@ -511,7 +511,7 @@
           #die "ERROR: Session->delete($name,$var): eval ($perl): $@" if ($@);
       }
       # } else we do nothing with it!
  -    &App::sub_exit() if ($App::trace_subs);
  +    &App::sub_exit() if ($App::trace);
   }
   
   #############################################################################
  @@ -540,7 +540,7 @@
   my $seq = 0;
   
   sub get_session_id {
  -    &App::sub_entry if ($App::trace_subs);
  +    &App::sub_entry if ($App::trace);
       my $self = shift;
       return $self->{session_id} if (defined $self->{session_id});
       my ($session_id);
  @@ -548,7 +548,7 @@
       $session_id = time() . ":" . $$;
       $session_id .= ":$seq" if ($seq > 1);
       $self->{session_id} = $session_id;
  -    &App::sub_exit($session_id) if ($App::trace_subs);
  +    &App::sub_exit($session_id) if ($App::trace);
       $session_id;
   }
   
  @@ -582,12 +582,12 @@
   =cut
   
   sub html {
  -    &App::sub_entry if ($App::trace_subs);
  +    &App::sub_entry if ($App::trace);
       my ($self, $options) = @_;
       my ($session_id, $html);
       $session_id = $self->get_session_id();
       $html = "<input type=\"hidden\" name=\"app.session_id\" value=\"$session_id\">";
  -    &App::sub_exit($html) if ($App::trace_subs);
  +    &App::sub_exit($html) if ($App::trace);
       $html;
   }
   
  @@ -613,14 +613,14 @@
   use Data::Dumper;
   
   sub dump {
  -    &App::sub_entry if ($App::trace_subs);
  +    &App::sub_entry if ($App::trace);
       my ($self, $ref) = @_;
       $ref = $self if (!$ref);
       my %copy = %$ref;
       delete $copy{context};   # don't dump the reference to the context itself
       my $d = Data::Dumper->new([ \%copy ], [ "session" ]);
       $d->Indent(1);
  -    &App::sub_exit($d->Dump()) if ($App::trace_subs);
  +    &App::sub_exit($d->Dump()) if ($App::trace);
       return $d->Dump();
   }
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.