OpenFrame::Cookie - An abstract cookie


OpenFrame documentation Contained in the OpenFrame distribution.

Index


Code Index:

NAME

Top

OpenFrame::Cookie - An abstract cookie

SYNOPSIS

Top

  my $colour = $cookies->get("colour")->value;

DESCRIPTION

Top

This class is used internally in OpenFrame to hold a cookie. An OpenFrame::Cookie object is returned when you fetch a cookie from a OpenFrame::Cookies object.

This class is a subclass of CGI::Cookie. You should call its value() method to get the value.

AUTHOR

Top

James Duncan <jduncan@fotango.com>


OpenFrame documentation Contained in the OpenFrame distribution.

package OpenFrame::Cookie;

use strict;
use warnings::register;

use CGI::Cookie;
use base qw ( CGI::Cookie );

our $VERSION=3.05;

sub value {
  my $self = shift;
  my $val  = shift;

  if (defined($val) && !ref($val)) {
    return $self->SUPER::value( [ $val ] );
  } elsif(defined($val) && ref($val)) {
    return $self->SUPER::value( $val, @_ );
  } else {
    return $self->SUPER::value( $val, @_ );
  }
}

1;

__END__