Parker, Brian wrote:
>>
>>On Mon, Jul 01, 2002 at 06:23:35PM -0400, Parker, Brian  wrote:
>>
>>>That makes sense.  I bet you're right. I wonder if 'sort' could be a
>>>no-op method for a scalar to handle this case.
>>
>>That would probably be a good idea.
>>
> 
> 
> OK, I vote for the following patch.  Looks like someone had the same idea for the 
>'item' method.  Sorry, I don't have a way to test a change to the .xs file.
> 
> $ diff -Naur orig_Stash.pm Stash.pm
> --- orig_Stash.pm       2002-07-02 19:07:06.000000000 -0500
> +++ Stash.pm    2002-07-02 19:07:20.000000000 -0500
> @@ -51,6 +51,7 @@
>  };
> 
>  $SCALAR_OPS = {
> +    'sort'    => sub {   $_[0] },

I'd rather see it as:
+    'sort'    => sub { die "Cannot sort a scalar ($_[0])" },

why in the world you will code your templating logic to sort scalars?

__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com



Reply via email to