Skip Menu |

This queue is for tickets about the Maypole CPAN distribution.

Report information
The Basics
Id: 15147
Status: resolved
Priority: 0/
Queue: Maypole

People
Owner: Nobody in particular
Requestors: peterspeltz [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in:
  • 2.11
  • 2.111
  • 2.11_pre1
  • 2.11_pre2
  • 2.11_pre3
  • 2.11_pre5
Fixed in: 2.12



Subject: Wish stash places in $r were intialized by Maypole
You know how you say things like: @{$r->objects || []} and $r->{template_args}{beerme} = 'hoppy'; # soon to be deprecated because you are worried that the array ref of hash ref in the objects acessor or template_args accessor has not been initialized yet ? Well that gets old does'nt it. It also sucks when you say: $r->stash->{last_beer} = $beer ; and get a "Can't use undefined value as hashref" error. because this is the first thing you are putting in the stash. I think slots in the Maypole object that are documented or understood(will be documented) to be of a particular type of reference, should be intialized to that type as early as possible. It will make things so much nicer. Things that fall under this are: $r-> objects params template_args stash (in svn) query Thanks, Peter
On Wed Oct 19 16:22:44 2005, PSPELTZ wrote: Show quoted text
> You know how you say things like: > > @{$r->objects || []} and > > $r->{template_args}{beerme} = 'hoppy'; # soon to be deprecated > > because you are worried that the array ref of hash ref in the objects > acessor or template_args accessor has not been initialized yet ? > > Well that gets old does'nt it. It also sucks when you say: > > $r->stash->{last_beer} = $beer ; > > and get a "Can't use undefined value as hashref" error. because this > is the first thing you are putting in the stash. > > I think slots in the Maypole object that are documented or > understood(will be documented) to be of a particular type of > reference, should be intialized to that type as early as possible. > > It will make things so much nicer. Things that fall under this are: > > $r-> > objects > params > template_args > stash (in svn) > query > >
Is this still the case in SVN? I rather hope not, and if it is I'll fix it before release
Subject: Re: [rt.cpan.org #15147] Wish stash places in $r were intialized by Maypole
Date: Tue, 25 Apr 2006 16:32:57 -0500
To: bug-Maypole [...] rt.cpan.org
From: "Peter Speltz" <peterspeltz [...] gmail.com>
I never fixed it. On 4/24/06, via RT <bug-Maypole@rt.cpan.org> wrote: Show quoted text
> > <URL: http://rt.cpan.org/Ticket/Display.html?id=15147 > > > On Wed Oct 19 16:22:44 2005, PSPELTZ wrote:
> > You know how you say things like: > > > > @{$r->objects || []} and > > > > $r->{template_args}{beerme} = 'hoppy'; # soon to be deprecated > > > > because you are worried that the array ref of hash ref in the objects > > acessor or template_args accessor has not been initialized yet ? > > > > Well that gets old does'nt it. It also sucks when you say: > > > > $r->stash->{last_beer} = $beer ; > > > > and get a "Can't use undefined value as hashref" error. because this > > is the first thing you are putting in the stash. > > > > I think slots in the Maypole object that are documented or > > understood(will be documented) to be of a particular type of > > reference, should be intialized to that type as early as possible. > > > > It will make things so much nicer. Things that fall under this are: > > > > $r-> > > objects > > params > > template_args > > stash (in svn) > > query > > > >
> > Is this still the case in SVN? > > I rather hope not, and if it is I'll fix it before release > > >
-- pjs
Fixed in SVN, unknown revision should be fine in 2.12 when released