Re: [Catalyst] Access config values

2009-01-29 Thread Dermot
2009/1/29 Jason Kohles :
> On Jan 29, 2009, at 7:18 AM, Dermot wrote:

>
> __PACKAGE__->config(
>schema_class => 'MyApp::Schema',
>connect_info => MyApp->config->{ 'MyApp::DB' }->{ 'connect_info' },
> );


Thanx Jason.
Dp.

___
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] Re: Supressing passwords in debug messages

2009-01-29 Thread Tomas Doran


On 29 Jan 2009, at 18:53, Byron Young wrote:

Hi - I'm not sure what the repost policy on patches, but I have the  
feeling this one slipped through the cracks.  Let me know if it's  
generally annoying to repost stuff.


No, reposting if things get dropped on the floor good :)

If you have time, then arriving on #catalyst-dev and making noise  
also gets stuff done.


This is a patch that allows you to suppress printing the value of  
certain query or body parameters when running Catalyst in debug  
mode - For example, if you want to hide passwords sent from the  
login page, you can put this in your app config (yaml):


Having been discussed in #catalyst-dev, we think that the patch could  
be made both more generic, and more elegant.


The key thing is to split the table drawing, and the data filtering  
into separate methods (maybe filter_debug_data?).


This would then allow you to filter per-type, and support things such  
as  redact_parameters (all), redact_body_parameters,  
redact_query_parameters, and even potentially to add support for  
filtering things like the URI (I can see use-cases where that'd be  
significant - e.g. not wanting to log session IDs which are in URIs)..


Have a look at the way the debug screen stuff works (in  
Catalyst::Engine), this is more elegant and would also benefit from  
being able to have things redacted I guess - as with the current  
patch, you're going to display the things you're redacting in the  
logs to the end user...


Cheers
t0m


___
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] Re: Supressing passwords in debug messages

2009-01-29 Thread J. Shirley
On Thu, Jan 29, 2009 at 12:30 PM, J. Shirley  wrote:
> On Thu, Jan 29, 2009 at 10:53 AM, Byron Young  
> wrote:
>> Hi - I'm not sure what the repost policy on patches, but I have the feeling 
>> this one slipped through the cracks.  Let me know if it's generally annoying 
>> to repost stuff.
>>
>> This is a patch that allows you to suppress printing the value of certain 
>> query or body parameters when running Catalyst in debug mode - For example, 
>> if you want to hide passwords sent from the login page, you can put this in 
>> your app config (yaml):
>>
>> Debug:
>>  redact_parameters:
>>- password
>>
>> and the resulting log will look like:
>>
>> [debug] Query Parameters are:
>>  
>> .-+--.
>>  | Parameter   | Value   
>>  |
>>  
>> +-+--+
>>  | password| (redacted by config)
>>  |
>>  | username| some_user   
>>  |
>>  
>> '-+--'
>>
>> There are two patches attached
>>  - redact-patch.diff - contains patch and test
>>  - cookbook-patch.diff - patch for cookbook entry about this
>>
>> Thanks to J Shirley for help with this.
>>
>> Thanks
>> Byron
>>
>>
>> Byron Young wrote on 2009-01-16:
>>> -Original Message-
>>> From: Byron Young [mailto:byron.yo...@riverbed.com]
>>> Sent: Friday, January 16, 2009 6:39 PM
>>> To: The elegant MVC web framework
>>> Subject: RE: [Catalyst] Re: Supressing passwords in debug messages
>>>
>>> Byron Young wrote on 2009-01-12:

 J. Shirley wrote on 2009-01-12:
> On Mon, Jan 12, 2009 at 2:35 PM, Byron Young
>  wrote:
>> J. Shirley wrote on 2009-01-12:
>>> On Mon, Jan 12, 2009 at 10:45 AM, Byron Young
>>>  wrote:

 [snip]

>>> The patch I'm creating needs to be configured in some way, I am
>>> thinking at this point it can be configured as follows:
>>>
>>> package MyApp;
>>>
>>> __PACKAGE__->config(
>>> 'Debug' => {
>>> skip_dump_parameters => 1, # Simply don't render the
>>> parameters incoming, very shotgunny skip_dump_parameters =>
>>> [ qw/password/ ], # Show '(redacted
>>> by
>>> config)' as the value of these fields
>>> }
>>> );
>>>
>>> I'll need to bake tests for this, which there are currently no tests
>>> for handling the dumping of parameters so it will be a bit more. If
>>> someone wants to help with that, let me know and I can help guide.
>>>
>>> -J
>>>
>>
>> I'd be happy to write some unit tests.  I haven't worked with
 any
> of the Catalyst unit tests before so I'm not sure what the process is
> like for getting the code, setting up the test environment, making and
> submitting changes and unit tests, etc.  Is there a doc you can point
> me to?  I don't see anything in the manual or wiki.
>>
>> Byron
>>
>> Mostly it is just checking out the code from svn and starting.
 The
> patch that I've started is at http://scsys.co.uk:8001/22410 - you can
> apply this to a svn checkout of
> http://dev.catalystframework.org/repos/Catalyst/Catalyst- Runtime/5.70
>
> It doesn't have the actual testing part, just a stub.  I'll be working
> on it more over today and tomorrow when I get free moments, but
> they're few and far between.
>
  Ditto on the lack of free time.  I'll check it out and let you know
 what I come up with.

 byron

>>>
>>> J Shirley - I finally got a chance to look at this today.  You did
>>> most of the work for me.  I just updated the unit test, changed the
>>> 'skip_dump_parameters' parameter to 'redact_parameters', and
>>> expanded the log_parameters() documentation a bit.  I also added a
>>> section to the cookbook explaining how to use the parameter.
>>>
>>> Attached are two patches:
>>>   redact-patch.diff - patch containing the new unit test and changes to
>>>   Catalyst.pm. cookbook-patch.diff - patch containing a new cookbook
>>>   section on
>>> this feature, for the Catalyst-Manual repository
>>>
>>> Anything else I need to do?
>>>
>>> Byron
>>
>>
>>
>> ___
>> 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/
>>
>>
>
> Hi Byron,
>
> Just my fault -- been busy and then sick, I'll try to get to it in the
> next few days.
>
> -J
>

Actually, scratch that.

I don't have the tuits or desire to cat herd this out.  Someone on the
core team can finish this up with you, I'm out.

-J

_

Re: [Catalyst] Re: Supressing passwords in debug messages

2009-01-29 Thread J. Shirley
On Thu, Jan 29, 2009 at 10:53 AM, Byron Young  wrote:
> Hi - I'm not sure what the repost policy on patches, but I have the feeling 
> this one slipped through the cracks.  Let me know if it's generally annoying 
> to repost stuff.
>
> This is a patch that allows you to suppress printing the value of certain 
> query or body parameters when running Catalyst in debug mode - For example, 
> if you want to hide passwords sent from the login page, you can put this in 
> your app config (yaml):
>
> Debug:
>  redact_parameters:
>- password
>
> and the resulting log will look like:
>
> [debug] Query Parameters are:
>  
> .-+--.
>  | Parameter   | Value
> |
>  
> +-+--+
>  | password| (redacted by config) 
> |
>  | username| some_user
> |
>  
> '-+--'
>
> There are two patches attached
>  - redact-patch.diff - contains patch and test
>  - cookbook-patch.diff - patch for cookbook entry about this
>
> Thanks to J Shirley for help with this.
>
> Thanks
> Byron
>
>
> Byron Young wrote on 2009-01-16:
>> -Original Message-
>> From: Byron Young [mailto:byron.yo...@riverbed.com]
>> Sent: Friday, January 16, 2009 6:39 PM
>> To: The elegant MVC web framework
>> Subject: RE: [Catalyst] Re: Supressing passwords in debug messages
>>
>> Byron Young wrote on 2009-01-12:
>>>
>>> J. Shirley wrote on 2009-01-12:
 On Mon, Jan 12, 2009 at 2:35 PM, Byron Young
  wrote:
> J. Shirley wrote on 2009-01-12:
>> On Mon, Jan 12, 2009 at 10:45 AM, Byron Young
>>  wrote:
>>>
>>> [snip]
>>>
>> The patch I'm creating needs to be configured in some way, I am
>> thinking at this point it can be configured as follows:
>>
>> package MyApp;
>>
>> __PACKAGE__->config(
>> 'Debug' => {
>> skip_dump_parameters => 1, # Simply don't render the
>> parameters incoming, very shotgunny skip_dump_parameters =>
>> [ qw/password/ ], # Show '(redacted
>> by
>> config)' as the value of these fields
>> }
>> );
>>
>> I'll need to bake tests for this, which there are currently no tests
>> for handling the dumping of parameters so it will be a bit more. If
>> someone wants to help with that, let me know and I can help guide.
>>
>> -J
>>
>
> I'd be happy to write some unit tests.  I haven't worked with
>>> any
 of the Catalyst unit tests before so I'm not sure what the process is
 like for getting the code, setting up the test environment, making and
 submitting changes and unit tests, etc.  Is there a doc you can point
 me to?  I don't see anything in the manual or wiki.
>
> Byron
>
> Mostly it is just checking out the code from svn and starting.
>>> The
 patch that I've started is at http://scsys.co.uk:8001/22410 - you can
 apply this to a svn checkout of
 http://dev.catalystframework.org/repos/Catalyst/Catalyst- Runtime/5.70

 It doesn't have the actual testing part, just a stub.  I'll be working
 on it more over today and tomorrow when I get free moments, but
 they're few and far between.

>>>  Ditto on the lack of free time.  I'll check it out and let you know
>>> what I come up with.
>>>
>>> byron
>>>
>>
>> J Shirley - I finally got a chance to look at this today.  You did
>> most of the work for me.  I just updated the unit test, changed the
>> 'skip_dump_parameters' parameter to 'redact_parameters', and
>> expanded the log_parameters() documentation a bit.  I also added a
>> section to the cookbook explaining how to use the parameter.
>>
>> Attached are two patches:
>>   redact-patch.diff - patch containing the new unit test and changes to
>>   Catalyst.pm. cookbook-patch.diff - patch containing a new cookbook
>>   section on
>> this feature, for the Catalyst-Manual repository
>>
>> Anything else I need to do?
>>
>> Byron
>
>
>
> ___
> 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/
>
>

Hi Byron,

Just my fault -- been busy and then sick, I'll try to get to it in the
next few days.

-J

___
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] [Announce] Catalyst-Runtime-5.8000_05

2009-01-29 Thread Tomas Doran


On 29 Jan 2009, at 19:51, Frank Wiegand wrote:

t/optional_memleak.t fails some of its tests.
Is this something to worry about?

See also RT Ticket #42540, which was filled against 5.7100.



No, its not.. This is a known issue with the test which hasn't been  
solved yet.


5.8000_04 _did_ leak memory, but (as far as I am aware) 5.8000_05 has  
fixed that.


Patches to fix the test so that it works more correctly _very_ welcome.

Cheers
t0m


___
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] [Announce] Catalyst-Runtime-5.8000_05

2009-01-29 Thread Frank Wiegand
Am Donnerstag, den 29.01.2009, 10:34 +0100 schrieb Marcus Ramberg:
> Now that you're all done upgrading to 5.7100, it's time to help us out
> by testing the next developer release of 5.8000, 5.8000_05, which was
> uploaded to CPAN today.

Thanks, great job!

t/optional_memleak.t fails some of its tests.
Is this something to worry about?

See also RT Ticket #42540, which was filled against 5.7100.


t/optional_memleak..1/75
#   Failed test ''http://localhost/engine/response/status/s200' memory is not 
leaking'
#   at t/optional_memleak.t line 73.
#  got: '51781632'
# expected: '51666944'
t/optional_memleak..3/75
#   Failed test ''http://localhost/engine/response/status/s403' memory is not 
leaking'
#   at t/optional_memleak.t line 73.
#  got: '51798016'
# expected: '51793920'
t/optional_memleak..5/75
#   Failed test ''http://localhost/engine/response/status/s500' memory is not 
leaking'
#   at t/optional_memleak.t line 73.
#  got: '51802112'
# expected: '51798016'
t/optional_memleak..15/75
#   Failed test ''http://localhost/index' memory is not leaking'
#   at t/optional_memleak.t line 73.
#  got: '51826688'
# expected: '51822592'
t/optional_memleak..18/75
#   Failed test ''http://localhost/action/index/foo' memory is not leaking'
#   at t/optional_memleak.t line 73.
#  got: '51830784'
# expected: '51826688'
t/optional_memleak..22/75
#   Failed test ''http://localhost/engine/response/redirect/one' memory is not 
leaking'
#   at t/optional_memleak.t line 73.
#  got: '51879936'
# expected: '51875840'
t/optional_memleak..26/75
#   Failed test ''http://localhost/engine/response/headers/one' memory is not 
leaking'
#   at t/optional_memleak.t line 73.
#  got: '51884032'
# expected: '51879936'
t/optional_memleak..32/75
#   Failed test ''http://localhost/engine/request/uri/change_base' memory is 
not leaking'
#   at t/optional_memleak.t line 73.
#  got: '51888128'
# expected: '51884032'  
t/optional_memleak..34/75
#   Failed test ''http://localhost/engine/request/uri?a=1;a=2;b=3' memory is 
not leaking'
#   at t/optional_memleak.t line 73.
#  got: '51892224'
# expected: '51888128'
t/optional_memleak..43/75
#   Failed test ''http://localhost/foo/bar/action' memory is not leaking'
#   at t/optional_memleak.t line 73.
#  got: '51924992'
# expected: '51920896'
t/optional_memleak..60/75
#   Failed test ''http://localhost/engine/response/errors/two' memory is not 
leaking'
#   at t/optional_memleak.t line 73.
#  got: '52051968'
# expected: '52043776'
t/optional_memleak..75/75 # Looks like 
you failed 11 tests of 75.
t/optional_memleak.. Dubious, test 
returned 11 (wstat 2816, 0xb00)
 Failed 11/75 subtests


This test ran under bleadperl. Using 5.8.9 I get failures too:
Tests 1, 2, 5, 14, 19, 33, 37, 39, 46, 48, 50, 59.


Thanks, Frank


___
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] Re: Supressing passwords in debug messages

2009-01-29 Thread Byron Young
Hi - I'm not sure what the repost policy on patches, but I have the feeling 
this one slipped through the cracks.  Let me know if it's generally annoying to 
repost stuff.

This is a patch that allows you to suppress printing the value of certain query 
or body parameters when running Catalyst in debug mode - For example, if you 
want to hide passwords sent from the login page, you can put this in your app 
config (yaml):

Debug:
  redact_parameters: 
- password

and the resulting log will look like:

[debug] Query Parameters are:
 .-+--.
 | Parameter   | Value|
 +-+--+
 | password| (redacted by config) |
 | username| some_user|
 '-+--'

There are two patches attached
  - redact-patch.diff - contains patch and test
  - cookbook-patch.diff - patch for cookbook entry about this

Thanks to J Shirley for help with this.

Thanks
Byron


Byron Young wrote on 2009-01-16:
> -Original Message-
> From: Byron Young [mailto:byron.yo...@riverbed.com]
> Sent: Friday, January 16, 2009 6:39 PM
> To: The elegant MVC web framework
> Subject: RE: [Catalyst] Re: Supressing passwords in debug messages
> 
> Byron Young wrote on 2009-01-12:
>> 
>> J. Shirley wrote on 2009-01-12:
>>> On Mon, Jan 12, 2009 at 2:35 PM, Byron Young
>>>  wrote:
 J. Shirley wrote on 2009-01-12:
> On Mon, Jan 12, 2009 at 10:45 AM, Byron Young
>  wrote:
>> 
>> [snip]
>> 
> The patch I'm creating needs to be configured in some way, I am
> thinking at this point it can be configured as follows:
> 
> package MyApp;
> 
> __PACKAGE__->config(
> 'Debug' => {
> skip_dump_parameters => 1, # Simply don't render the
> parameters incoming, very shotgunny skip_dump_parameters =>
> [ qw/password/ ], # Show '(redacted
> by
> config)' as the value of these fields
> }
> );
> 
> I'll need to bake tests for this, which there are currently no tests
> for handling the dumping of parameters so it will be a bit more. If
> someone wants to help with that, let me know and I can help guide.
> 
> -J
> 
 
 I'd be happy to write some unit tests.  I haven't worked with
>> any
>>> of the Catalyst unit tests before so I'm not sure what the process is
>>> like for getting the code, setting up the test environment, making and
>>> submitting changes and unit tests, etc.  Is there a doc you can point
>>> me to?  I don't see anything in the manual or wiki.
 
 Byron
 
 Mostly it is just checking out the code from svn and starting.
>> The
>>> patch that I've started is at http://scsys.co.uk:8001/22410 - you can
>>> apply this to a svn checkout of
>>> http://dev.catalystframework.org/repos/Catalyst/Catalyst- Runtime/5.70
>>> 
>>> It doesn't have the actual testing part, just a stub.  I'll be working
>>> on it more over today and tomorrow when I get free moments, but
>>> they're few and far between.
>>> 
>>  Ditto on the lack of free time.  I'll check it out and let you know
>> what I come up with.
>> 
>> byron
>> 
> 
> J Shirley - I finally got a chance to look at this today.  You did
> most of the work for me.  I just updated the unit test, changed the
> 'skip_dump_parameters' parameter to 'redact_parameters', and
> expanded the log_parameters() documentation a bit.  I also added a
> section to the cookbook explaining how to use the parameter.
> 
> Attached are two patches:
>   redact-patch.diff - patch containing the new unit test and changes to
>   Catalyst.pm. cookbook-patch.diff - patch containing a new cookbook
>   section on
> this feature, for the Catalyst-Manual repository
> 
> Anything else I need to do?
> 
> Byron




redact-patch.diff
Description: redact-patch.diff


cookbook-patch.diff
Description: cookbook-patch.diff
___
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] [RFC] FirePHP::Dispatcher and Catalyst::Plugin::FirePHP

2009-01-29 Thread Sebastian Willert

Hi all, 

I've been working on a perl module that displays messages in the
FirePHP[1] console and bindings for the Catalyst logging universe.

The only thing you need to do to start using FirePHP is to include
Catalyst::Plugin::FirePHP in your plugin list. Everything else should
happen automatically, no other config should be needed (at least when
using C::Log or C::Log::Log4perl).

The current (quite usable) implementation can be found at
http://github.com/willert/firephp-perl/ . I'd like to invite you to
test, break, criticize to your heart's content. 

Cheers, 
  Sebastian

---
[1] FirePHP enables you to log to your Firebug Console using a simple
PHP. All data is sent via response headers and will not interfere with
the content on your page. (taken from http://www.firephp.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] Access config values

2009-01-29 Thread Jason Kohles

On Jan 29, 2009, at 7:18 AM, Dermot wrote:

Rats, Sorry I have read a thread on this in the past but I can't  
find it.


I want to set the dsn vaules in my app conf (config general) alone.
The values are


   connect_info dbi:SQLite:/var/db/myapp/myapp.db
   connect_info dummy username


How can I get these to values in my Schema config, which currently
looks like this.

use base 'Catalyst::Model::DBIC::Schema';

__PACKAGE__->config(
   schema_class => 'MyApp::Schema',
   connect_info => [ 'dbi:SQLite:/var/db/myapp/myapp.db' ],
);

Is there a way to pass config->connect_info those values from my conf.


__PACKAGE__->config(
schema_class => 'MyApp::Schema',
connect_info => MyApp->config->{ 'MyApp::DB' }->{ 'connect_info' },
);

--
Jason Kohles, RHCA RHCDS RHCE
em...@jasonkohles.com - http://www.jasonkohles.com/
"A witty saying proves nothing."  -- Voltaire



___
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/


decoding in core (Was: [Catalyst] [Announce] Catalyst-Runtime-5.8000_05)

2009-01-29 Thread Bill Moseley
Sorry to jump in so late here, but has there been any discussion on
moving decoding requests into core?  Requests come in octets and end
up in Perl as parameters which are used as (typically) character
strings.  So, really should decode every request based on the request
charset if provided, no?

Neither of the existing plugins do it correctly (IMO), as they only
decode parameters leaving body_parameters as octets, and don't look at
the request for the charset, IIRC.

The risk is that existing apps may puke with "Wide character in
output" errors (if calls that check that are used), but a big change
like 5.8 would be a good time to force apps to handle encoding
correctly.

And here's a question: uri_for() rightly encodes to octets before
escaping, but it always encodes to utf-8.  Is it assumed that query
parameters are always utf-8 or should they be decoded with the
charset specified in the request?



-- 
Bill Moseley
mose...@hank.org
Sent from my iMutt


___
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: RE: [Catalyst] generic way of "session has expired" message?

2009-01-29 Thread Bill Moseley
On Thu, Jan 29, 2009 at 07:05:07AM +0100, Jens Schwarz wrote:
> $c->session_delete_reason() is empty as soon as the session expires,
> because delete_reason is zapped with the session.

I'm using such a modified version of Session now I may be off, but
yes, if you have a session store that expires the session then that
happens.  IIRC, the Session code has two stored items for each session
-- the session data and a separate item to manage the session expires
time.  But, if the session data expires or if the cookie expires then
you don't have anything to indicate that it expired.

In the past I would set a separate persistent cookie on login and
would delete it on explicit logout.  That way if they had that cookie
but were not logged in I could tell them their session expired.

I quit reporting to users that their session expired.  They seem to
figure it out when they are asked for their login again.  And it
doesn't really change the fact that they must log in again.  People
seem to understand that you can get logged out for inactivity.

-- 
Bill Moseley
mose...@hank.org
Sent from my iMutt


___
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] FormBuilder not working

2009-01-29 Thread abhishek jain
On Sun, Sep 28, 2008 at 12:23 AM, abhishek jain
wrote:

>
>>>
>>>  For example I do something like this for a radio button
>>  lang_publish:
>>   label: Publish
>>   options: Y=Yes, N=No
>>   value: N
>>   required: 1
>>
>> For a select like you want it should be
>>  lang_publish:
>>  label: Publish
>>  options: Y=Yes,N=No
>>  type: select
>>  required: 1
>>
>> also youcan add the multiple attribute to specify if more than one can be
>> selected
>>
>> Hope this helps
>>
>
> Thanks a lot for the info,What if i have comma (,) as a part  of the
> value,
> I am not framing questions it is a part of the requirement and i am not
> finding anything on net.
> Also someone told me formbuilder is not supported much anymore and one
> should use FormFu, is it true?
> Pl. someone reply,
> --
> Thanks and kind Regards,
> Abhishek jain
>
>

someone pl. reply , what i need to do if i need to add commas in value of
the select dropdown while using Formbuilder.and what is better Formbuilder
or FormFu
-- 
Thanks and kind Regards,
Abhishek jain
___
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] Re: Detach won't detach?

2009-01-29 Thread Octavian Rasnita
I thought that this discussion was about perl golf...

Octavian

- Original Message - 
From: "Jonathan Rockway" 
To: "The elegant MVC web framework" 
Sent: Thursday, January 29, 2009 1:33 PM
Subject: Re: [Catalyst] Re: Detach won't detach?


>* On Thu, Jan 29 2009, Octavian Rasnita wrote:
>> I see. In that case $_->[-1] could be used instead of $c, but it is not very 
>> nice...
> 
> BTW, I thought I would reply to this thread and remind everyone that
> this is just supposed to be funny at this point.  If you actually write
> your code this way, you are crazy... and not in a good way.
> 
> Aristotle's code is the idiomatically correct version, so that's what
> you should aim for in this case and in general.
> 
> 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/

___
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] Access config values

2009-01-29 Thread Dermot
Rats, Sorry I have read a thread on this in the past but I can't find it.

I want to set the dsn vaules in my app conf (config general) alone.
The values are


connect_info dbi:SQLite:/var/db/myapp/myapp.db
connect_info dummy username



How can I get these to values in my Schema config, which currently
looks like this.

use base 'Catalyst::Model::DBIC::Schema';

__PACKAGE__->config(
schema_class => 'MyApp::Schema',
connect_info => [
'dbi:SQLite:/var/db/myapp/myapp.db',

],
);

Is there a way to pass config->connect_info those values from my conf.
TIA,
Dp.

___
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] Re: Detach won't detach?

2009-01-29 Thread Jonathan Rockway
* On Thu, Jan 29 2009, Octavian Rasnita wrote:
> I see. In that case $_->[-1] could be used instead of $c, but it is not very 
> nice...

BTW, I thought I would reply to this thread and remind everyone that
this is just supposed to be funny at this point.  If you actually write
your code this way, you are crazy... and not in a good way.

Aristotle's code is the idiomatically correct version, so that's what
you should aim for in this case and in general.

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/


[Catalyst] [Announce] Catalyst-Runtime-5.8000_05

2009-01-29 Thread Marcus Ramberg
Now that you're all done upgrading to 5.7100, it's time to help us out by
testing the next developer release of 5.8000, 5.8000_05, which was uploaded
to CPAN today. I've included the changelog since the previous developer
release at the bottom of the mail.
In case you want to help out with the actual development 5.8, this is our
current TODO:

Known issues:

 - Catalyst-Log-Log4perl Deep recursion on subroutine "MockApp::setup"
due
   to Adopt::NEXT not remembering which setup methods were already
called
   and which not, like NEXT does. Log::Log4perl needs to be fixed and
the
   problem should be described in Upgrading.pod. (rafl)

 - MX::Emulate::CAF - list assignment (see notes in Upgrading.pod and
   branch in svn)

 - Catalyst::Plugin::Session::State::Cookie - cookie_name is undefined
   unless explicitly configured because setup_session isn't executed.

Documentation:

   - Catalyst/Upgrading.pod needs brushing up

Profiling:

  - vs 5.70 and optimisation as needed.

Marcus Ramberg
Go West, Young Catalyst!

5.8000_05 2008-29-01 00:00
- Text::SimpleTable's go as wide as $ENV{COLUMNS} (jhannah)
  Patch written by Oleg Kostyuk 
- Improve docs for visit (mateu)
- Add docs for finalize hook (dhoss)
- Added ru/ua translations to error page
- Improve the clarity and verbosity of the warning when component
  resolution uses regex fallback. (jhannah)
- Handle leading CRLF in HTTP requests sometimes sent by IE6 in
  keep-alive requests. (andyg)
- Fixes for FastCGI with IIS 6.0 (janus)
- Passing request method exported by Catalyst::Test an extra
  parameter used to be ignored, but started breaking if the
parameter
  was not a hash in 5.8000_04. Extra parameter is now ignored if
  it isn't a hashref (t0m)
- Fix request argumentss getting corrupted if you override the
  dispatcher and call an action which detaches (for
  Catalyst::Plugin::Authorization::ACL) (t0m)
- Fix calling use Catalyst::Test 'MyApp' 'foo' which used to work,
  but stopped as the 2nd parameter can be an options hash now (t0m)
- Bump Moose dependency to fix make_immutable bug (t0m)
- Use compile time extends in Catalyst::Controller (t0m)
- Make Catalyst::Request::uploads attribute non-lazy, to fix
  test for Catalyst-Engine-Apache (t0m)
- Bump version of MooseX::Emulate::Class::Accessor::Fast (t0m)
- Stop using MooseX::Adopt::Class::Accessor::Fast by default, to
stop
  breaking other packages which use Class::Accessor::Fast
- Remove unused action_container_class attribute from
  Catalyst::Dispatcher (t0m)
- Replace {_body} instance access with calls to _body accessors
(t0m)
- Add backwards compatibility alias methods for private attributes
on
  Catalyst::Dispatcher which used to be public. Needed by
  Catalyst::Plugin::Server and
 Catalyst::Plugin::Authorization::ACL
  (t0m)
- Fix return value of $c->req->body, which delegates to the body
  method on the requests HTTP::Body instance (t0m)
  - Test for this (t0m)
- Fix calling $c->req->body from inside an overridden prepare_action
  method in a plugin, as used by Catalyst::Plugin::Server (t0m)
  - Test for this (t0m)
- Fix assignment to Catalyst::Dispatcher's preload_dispatch_types
and
  postload_dispatch_types attributes - assigning a list should
later
  return a listref. Fixes Catalyst::Plugin::Server. (t0m)
  - Tests for this (t0m)
- Change streaming test to serve itself rather than 01use.t, making
  test sync for engines easier (t0m)
- Refactor capturing of $app from Catalyst::Controller into
  Catalyst::Component::ApplicationAttribute for easier reuse in
other
  components (Florian Ragwitz)
- Make the test suites YAML dependency optional (Florian Ragwitz)
- Make debug output show class name for the engine and dispatcher
  rather than the stringified ref. (t0m)
- Make MyApp immutable at the end of the scope after the setup
  method is called, fixing issues with plugins which have their
  own new methods by inlining a constructor on MyApp (t0m)
  - Test for this and method modifiers in MyApp (t0m)
- Fix bug causing Catalyst::Request::Upload's basename method
  to return undef (t0m)
  - Test for this (Carl Franks)
- Fix loading of classes which do not define any symbols to not
  die, as it didn't in 5.70 (t0m)
  - Test for this (t0m)
- Bump MooseX::Emulate::Class::Accessor::Fast dependency
  to force new version which fixes a lot of plugins (t0m)
- Make log levels additive, and add documentation and tests
  for the setup_log method, which previously h