Re: [Catalyst] UTF-16 surrogate warning under FastCGI

2008-07-22 Thread Martin Ellison
Jim, thanks for that. I have the same problem but have not had the time to
create a test case.

2008/7/23 Jim Spath <[EMAIL PROTECTED]>

> Jim Spath wrote:
>
>> So I know the whole UTF-16 surrogate warning issue has been brought up a
>> few times on this list, but I don't think anyone has posted a reliable test
>> case, so I thought I would take a stab at it.  We have over 2700 of these
>> warnings in todays error logs, so it'd be nice to get rid of them.
>>
>> All that's really necessary is to reproduce the problem is to output a
>> body of the necessary length:
>>
>>  # 56338 = 0xdc12
>>  $c->response->body(1 x 56338);
>>
>> And to run your application under FastCGI.  It will produce the following
>> warning every time:
>>
>> UTF-16 surrogate 0xdc12 at /usr/lib/perl/5.8/IO/Handle.pm line 199.
>>
>> I've created a minimal Catalyst application to demonstrate the problem
>> which can be downloaded here:
>>
>> http://www.filedropper.com/utf16tar
>>
>> No plugins are used and binmode is not set.
>>
>> Anyways, hopefully this makes it easier for people to figure out what is
>> going on.
>>
>> - Jim
>>
>
> The tar.gz file for my demonstration application appears to be messed up,
> sorry about that.  Here's a zip file that is valid:
>
> http://www.filedropper.com/utf16
>
>
> - Jim
>
> ___
> List: Catalyst@lists.scsys.co.uk
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive:
> http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
> Dev site: http://dev.catalyst.perl.org/
>



-- 
Regards,
Martin
([EMAIL PROTECTED])
IT: http://methodsupport.com Personal: http://thereisnoend.org
___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] Catalyst::Authentication::Credential::LDAP

2008-07-22 Thread Matt S Trout
On Wed, Jun 25, 2008 at 11:27:13AM -0700, Bruce J Keeler wrote:
> Also, somewhat apropos, I have a 
> C::A::{Store,Credential}::ActiveDirectory  that I based on the LDAP 
> stuff.  The LDAP modules didn't work for me because they want to bind 
> anonymously and retrieve the crypted password, whereas AD just wants to 
> authenticate with a bind.

So, having established this isn't true.

Could you perhaps instead post a message asking why your config of the
main LDAP store didn't work so we can figure out what configuration problem
you had and document it?

Awesome though it is that you wrote a store and credential, I'd rather the
next person wrote one that didn't already exist :)

-- 
  Matt S Trout   Need help with your Catalyst or DBIx::Class project?
   Technical Directorhttp://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/

___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] auto re-load of application yaml config file?

2008-07-22 Thread Matt S Trout
On Tue, Jul 22, 2008 at 12:53:10PM +0200, Marc Sebastian Pelzer wrote:
> Hello,
> 
> I'm running a Catalyst application under mod_perl and wonder if there  
> is a Plugin available that detects changes on the main  
> application .yml config file and does a automatic re-load if needed?  
> It not - what would be the most elegant (and less I/O intensive) way  
> of doing this? Would it be enough to do a
> 
> __PACKAGE__->config( 'Plugin::ConfigLoader' => { file =>  
> 'my_config.yml' } );
> in my Root controller when I detect a change? 

Nope. apache2ctl restart, minimum.

You may find external FastCGI and a handler swap is a better approach.

-- 
  Matt S Trout   Need help with your Catalyst or DBIx::Class project?
   Technical Directorhttp://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/

___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] Catalyst and Taint?

2008-07-22 Thread Matt S Trout
On Mon, Jul 21, 2008 at 10:08:11PM -0700, Chris Weyl wrote:
> Hey all --
> 
> A google of "catalyst taint" turns up this message:
> 
> http://lists.scsys.co.uk/pipermail/catalyst/2005-December/004007.html
> 
> It doesn't look like there has been a release of
> Module::Pluggable::Fast since then.  Does anyone know where this patch
> lurks? :-)  (Assuming, of course, that this is still the right path to
> work down.)

We don't even use Module::Pluggable::Fast anymore. Catalyst went back to
a refactored plain Module::Pluggable instead for 5.70+. Hopefully the
patch claco sent back then got applied somewhere in the meantime.

Before caring about a three year old message, first check the module
it refers to is even involved anymore :)

(and since you're the only person since to mention taint mode, I don't
think most people care about it - I certainly don't see it being very
useful for Catalyst code, maybe you could enlighten us as to why you
do?)

-- 
  Matt S Trout   Need help with your Catalyst or DBIx::Class project?
   Technical Directorhttp://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/

___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] auto re-load of application yaml config file?

2008-07-22 Thread Jonathan Rockway
* On Tue, Jul 22 2008, Marc Sebastian Pelzer wrote:
> Hello,
>
> I'm running a Catalyst application under mod_perl and wonder if there
> is a Plugin available that detects changes on the main  application
> .yml config file and does a automatic re-load if needed?  It not -
> what would be the most elegant (and less I/O intensive) way  of doing
> this? Would it be enough to do a
>
> __PACKAGE__->config( 'Plugin::ConfigLoader' => { file =>
> my_config.yml' } );
> in my Root controller when I detect a change? Also, is there a way to
> store the state (maybe the mtime of the config file) in memory without
> being lost between requests? Or do I need to store the mtime in a
> database/memcache/tempfile (which would be "expensive")?
> Many thanks in advance for any hint :)

Reading the config file causes a lot of things to happen (instantiating
your controllers with certain arguments, for example), so this won't
work.  You really need to just restart the app from scratch when you
change the config.

If you want lightweight on-the-fly configurability, you should roll your
own.  You will have to engineer something with a compromise that meets
your needs.  For example, checking the database every time you read a
variable will mean the config settings update quickly, but you also slow
your app way down.  YMMV and all that ;)

Regards,
Jonathan Rockway

-- 
print just => another => perl => hacker => if $,=$"

___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] UTF-16 surrogate warning under FastCGI

2008-07-22 Thread Jim Spath

Jim Spath wrote:
So I know the whole UTF-16 surrogate warning issue has been brought up a 
few times on this list, but I don't think anyone has posted a reliable 
test case, so I thought I would take a stab at it.  We have over 2700 of 
these warnings in todays error logs, so it'd be nice to get rid of them.


All that's really necessary is to reproduce the problem is to output a 
body of the necessary length:


  # 56338 = 0xdc12
  $c->response->body(1 x 56338);

And to run your application under FastCGI.  It will produce the 
following warning every time:


UTF-16 surrogate 0xdc12 at /usr/lib/perl/5.8/IO/Handle.pm line 199.

I've created a minimal Catalyst application to demonstrate the problem 
which can be downloaded here:


http://www.filedropper.com/utf16tar

No plugins are used and binmode is not set.

Anyways, hopefully this makes it easier for people to figure out what is 
going on.


- Jim


The tar.gz file for my demonstration application appears to be messed 
up, sorry about that.  Here's a zip file that is valid:


http://www.filedropper.com/utf16

- Jim

___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


[Catalyst] UTF-16 surrogate warning under FastCGI

2008-07-22 Thread Jim Spath
So I know the whole UTF-16 surrogate warning issue has been brought up a 
few times on this list, but I don't think anyone has posted a reliable 
test case, so I thought I would take a stab at it.  We have over 2700 of 
these warnings in todays error logs, so it'd be nice to get rid of them.


All that's really necessary is to reproduce the problem is to output a 
body of the necessary length:


  # 56338 = 0xdc12
  $c->response->body(1 x 56338);

And to run your application under FastCGI.  It will produce the 
following warning every time:


UTF-16 surrogate 0xdc12 at /usr/lib/perl/5.8/IO/Handle.pm line 199.

I've created a minimal Catalyst application to demonstrate the problem 
which can be downloaded here:


http://www.filedropper.com/utf16tar

No plugins are used and binmode is not set.

Anyways, hopefully this makes it easier for people to figure out what is 
going on.


- Jim

___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] Catalyst-Devel Patch

2008-07-22 Thread Todd Rinaldo
I like the new section. Perfect!

Thanks,
Todd

On Mon, Jul 21, 2008 at 9:10 AM, Ash Berlin <[EMAIL PROTECTED]> wrote:
>
> On 21 Jul 2008, at 14:37, Todd Rinaldo wrote:
>
>> J, Thanks for the detailed reply. I hadn't thought about the base
>> class nature of this class. Catalyst and DBIC are both MAJOR
>> development projects. This means their documentation on CPAN gets
>> spread broadly over many pages. I admit this is not a problem for most
>> modules on CPAN. I suppose my patch was specifically aimed at dealing
>> with some of this. I have countless times asked questions on a
>> list/IRC which was clearly documented on a page I'd reviewed multiple
>> times. Once I knew where to look, the answer was easy.
>>
>> I am a major fan of wiki, as it's low entry barrier can make it easy
>> for the people who most need the information (newbies) to append to
>> the docs or clarify the docs once they get their answer. I'll take a
>> look at the available wikis. When I'm done, I suspect my comment will
>> be, well if this is the best place to put the docs on useability,
>> shouldn't we point to it from the POD? This would effectivley allow us
>> to separate the design specs related stuff (POD) from the practical
>> use (WIKI). What are your thoughts on this approach?
>>
>> Todd
>
> Generally, the problem with the docs for Catalyst::Helper is that they are
> only relevant if you are writing a new helper, not if you are trying to use
> it.
>
> I've just re-ordered the POD in Catalyst::Helper a bit, and added a section
> linking to common helpers:
>
>  http://dev.catalystframework.org/svnweb/Catalyst/revision?rev=8144
>
> Something similar to what you suggested in your original message might have
> a place in Catalyst::Helper::Model::DBIC::Schema (or a link to the relevant
> docs there)
>
> -ash
>
> ___
> List: Catalyst@lists.scsys.co.uk
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
> Dev site: http://dev.catalyst.perl.org/
>
>



-- 
Todd Rinaldo
[EMAIL PROTECTED]

___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] Catalyst::Authentication::Credential::LDAP

2008-07-22 Thread Wade . Stuart
Matt S Trout <[EMAIL PROTECTED]> wrote on 07/21/2008 04:32:03 PM:
>
> Maybe the search phase failed for the original poster?
>
> I dunno, I was just saying it should probably support both approaches :)
>

Sorry Matt,  my comment was directed twords the OP not you -- I just
piggybacked on your message.  If the search phase failed for him it seems
like it was a config problem or a edge bug (lets find it and fix vs a new
ldap auth module for cat on cpan).  I have used it on a bunch o different
AD schemas (some heavily segmented,  some heavily locked down) with no
issues.  I don't really know of any non vendor ldap auth that grabs the
crypted pass for client side auth instead of binding against the user (what
this app does).



___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


[Catalyst] auto re-load of application yaml config file?

2008-07-22 Thread Marc Sebastian Pelzer

Hello,

I'm running a Catalyst application under mod_perl and wonder if there  
is a Plugin available that detects changes on the main  
application .yml config file and does a automatic re-load if needed?  
It not - what would be the most elegant (and less I/O intensive) way  
of doing this? Would it be enough to do a


__PACKAGE__->config( 'Plugin::ConfigLoader' => { file =>  
'my_config.yml' } );
in my Root controller when I detect a change? Also, is there a way to  
store the state (maybe the mtime of the config file) in memory without  
being lost between requests? Or do I need to store the mtime in a  
database/memcache/tempfile (which would be "expensive")?

Many thanks in advance for any hint :)


___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/