Mailing List Archive

Force $c->user to return undef
Hi!

Is the attached a valid patch to C::P::Authentication 0.10007?

I have some functions in Opsview where I do function_call( $c->user,
$other_data). But if $c->user does not exist, C::P::A returns an empty
list, which is considered no value in the function call. The patch
forces an undef.

Opinions?

Ton

http://www.altinity.com
UK: +44 (0)870 787 9243
US: +1 866 879 9184
Fax: +44 (0)845 280 1725
Skype: tonvoon
Re: Force $c->user to return undef [ In reply to ]
On Thu, Sep 18, 2008 at 03:47:54PM +0100, Ton Voon wrote:
> Hi!
>
> Is the attached a valid patch to C::P::Authentication 0.10007?
>
> I have some functions in Opsview where I do function_call( $c->user,
> $other_data). But if $c->user does not exist, C::P::A returns an empty
> list, which is considered no value in the function call. The patch
> forces an undef.

Makes sense to me, I've pinged Jay Kuri to have a look.

--
Matt S Trout Need help with your Catalyst or DBIx::Class project?
Technical Director http://www.shadowcat.co.uk/catalyst/
Shadowcat Systems Ltd. Want a managed development or deployment platform?
http://chainsawblues.vox.com/ http://www.shadowcat.co.uk/servers/

_______________________________________________
Catalyst-dev mailing list
Catalyst-dev@lists.scsys.co.uk
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst-dev
Re: Force $c->user to return undef [ In reply to ]
Hey Ton,

Replying for benefit of the list:

I've incorporated this patch. It will be part of the next release.

Jay

On Sep 18, 2008, at 8:47 AM, Ton Voon wrote:

> Hi!
>
> Is the attached a valid patch to C::P::Authentication 0.10007?
>
> I have some functions in Opsview where I do function_call( $c->user,
> $other_data). But if $c->user does not exist, C::P::A returns an
> empty list, which is considered no value in the function call. The
> patch forces an undef.
>
> Opinions?
>
> Ton
>
> http://www.altinity.com
> UK: +44 (0)870 787 9243
> US: +1 866 879 9184
> Fax: +44 (0)845 280 1725
> Skype: tonvoon
>
> <cat_auth_return_undef_for_no_user.patch>
>
> _______________________________________________
> Catalyst-dev mailing list
> Catalyst-dev@lists.scsys.co.uk
> http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst-dev


_______________________________________________
Catalyst-dev mailing list
Catalyst-dev@lists.scsys.co.uk
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst-dev