Added comments to the POD in Var.pm that creating a Var object overwrites

the Session Id.  This is by design.

Added a check to Style.pm so that if no params are passed to setLink that
it won't die by trying to deref undef into a hashref.

First set of tests for Session/Style added.
This commit is contained in:
Colin Kuskie 2006-10-03 23:27:08 +00:00
parent fd44b5d96e
commit ff2344cdad
3 changed files with 55 additions and 2 deletions

View file

@ -248,7 +248,8 @@ Sets a <link> tag into the <head> of this rendered page for this page view. This
=head3 url
The URL to the document you are linking.
The URL to the document you are linking. Only one link can be set per url. If a link to this URL exists,
the old link will remain and this method will return undef.
=head3 params
@ -260,6 +261,7 @@ sub setLink {
my $self = shift;
my $url = shift;
my $params = shift;
$params = {} unless (defined $params and ref $params eq 'HASH');
return undef if ($self->{_link}{$url});
my $tag = '<link href="'.$url.'"';
foreach my $name (keys %{$params}) {

View file

@ -149,7 +149,7 @@ sub isAdminOn {
=head2 new ( session, sessionId, noFuss )
Constructor. Returns a var object.
Constructor. Overwrites the sessionId of $session with its own id. Returns a var object.
=head3 session