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

2005-08-09 Thread Stephen Adkins
cvsuser 05/08/09 12:05:03

  Modified:App-Context/lib/App SessionObject.pm
  Log:
  change containment separator from . to -
  
  Revision  ChangesPath
  1.7   +66 -3 p5ee/App-Context/lib/App/SessionObject.pm
  
  Index: SessionObject.pm
  ===
  RCS file: /cvs/public/p5ee/App-Context/lib/App/SessionObject.pm,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- SessionObject.pm  14 Mar 2005 17:37:04 -  1.6
  +++ SessionObject.pm  9 Aug 2005 19:05:02 -   1.7
  @@ -167,7 +167,7 @@
   $name   = $self-{name};
   $absorbable_attribs = $self-absorbable_attribs();
   $container  = default;
  -if ($name =~ /^(.+)\.[a-zA-Z][a-zA-Z0-9_]*$/) {
  +if ($name =~ /^(.+)-[a-zA-Z][a-zA-Z0-9_]*$/) {
   $container = $1;
   }
   
  @@ -218,6 +218,69 @@
   =cut
   
   #
  +# Method: container()
  +#
  +
  +=head2 container()
  +
  +* Signature: $self-container();
  +* Signature: $self-container($name);
  +* Params:$name  string
  +* Throws:App::Exception
  +* Since: 0.01
  +
  +$container = $session_object-container();
  +
  +=cut
  +
  +sub container {
  +App::sub_entry if ($App::trace);
  +my ($self, $name) = @_;
  +$name ||= $self-{name};
  +my ($container);
  +if ($name =~ /^(.+)-[a-zA-Z][a-zA-Z0-9_]*$/) {
  +$container = $1;
  +}
  +else {
  +$container = default;
  +}
  +App::sub_exit($container) if ($App::trace);
  +return($container);
  +}
  +
  +#
  +# Method: container_attrib()
  +#
  +
  +=head2 container_attrib()
  +
  +* Signature: $attrib = $self-container_attrib();
  +* Signature: $attrib = $self-container_attrib($name);
  +* Params:$name  string
  +* Returns:   $attribstring
  +* Throws:App::Exception
  +* Since: 0.01
  +
  +$attrib = $session_object-container_attrib();
  +
  +=cut
  +
  +sub container_attrib {
  +App::sub_entry if ($App::trace);
  +my ($self, $name) = @_;
  +$name ||= $self-{name};
  +my ($attrib);
  +if ($name =~ /^.+-([a-zA-Z][a-zA-Z0-9_]*)$/) {
  +$attrib = $1;
  +}
  +else {
  +$attrib = $name;
  +}
  +App::sub_exit($attrib) if ($App::trace);
  +return($attrib);
  +}
  +
  +#
   # Method: handle_event()
   #
   
  @@ -249,7 +312,7 @@
   my $name = $self-{name};
   my $context = $self-{context};
   my $container = default;
  -if ($name =~ /^(.+)\.[a-zA-Z][a-zA-Z0-9_]*$/) {
  +if ($name =~ /^(.+)-[a-zA-Z][a-zA-Z0-9_]*$/) {
   $container = $1;
   }
   else {
  
  
  


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

2004-11-10 Thread Stephen Adkins
cvsuser 04/11/10 07:40:12

  Modified:App-Context/lib/App SessionObject.pm
  Log:
  default cname is default
  
  Revision  ChangesPath
  1.5   +2 -2  p5ee/App-Context/lib/App/SessionObject.pm
  
  Index: SessionObject.pm
  ===
  RCS file: /cvs/public/p5ee/App-Context/lib/App/SessionObject.pm,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- SessionObject.pm  2 Sep 2004 20:56:51 -   1.4
  +++ SessionObject.pm  10 Nov 2004 15:40:12 -  1.5
  @@ -1,6 +1,6 @@
   
   #
  -## $Id: SessionObject.pm,v 1.4 2004/09/02 20:56:51 spadkins Exp $
  +## $Id: SessionObject.pm,v 1.5 2004/11/10 15:40:12 spadkins Exp $
   #
   
   package App::SessionObject;
  @@ -233,7 +233,7 @@
   $container = $1;
   }
   else {
  -my $cname = $context-so_get(default,cname);
  +my $cname = $context-so_get(default,cname,default);
   if ($cname ne $name  $cname !~ /^$name\./) {
   $container = $cname;  # container is the current active 
widget
   }