On Sat, Oct 27, 2012 at 9:34 PM, Larry Leszczynski <[email protected]>wrote:
> Hi Bill -
>
> On Fri, Oct 19, 2012, at 11:37 AM, Bill Moseley wrote:
>
> > Use of uninitialized value in delete
> >
> > with a line number pointing to this line:
> >
> > delete $c->stash->{foo};
> >
> > I didn't think that delete() issued a warning,
>
> Are both $c and $c->stash defined at that point?
>
Those would be different errors in Perl:
$ perl -wle 'my $c; $c->foo'
Can't call method "foo" on an undefined value at -e line 1.
$ perl -wle 'sub Foo::stash { return {} }; $s = bless {}, "Foo"; delete
$s->stash->{bar}'
$ perl -wle 'sub Foo::stash { undef }; $s = bless {}, "Foo"; delete
$s->stash->{bar}'
Can't use an undefined value as a HASH reference at -e line 1.
--
Bill Moseley
[email protected]
_______________________________________________
List: [email protected]
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/