On Mon, Jun 04, 2007 at 10:59:41PM -0700, Bill Moseley wrote:
In a template I was using:
c.uri_for( 'path', arg1, arg2 );
where arg1 and arg2 are sometimes not defined. In that case uri_for
generates a url with two trailing slashes.
Is there a reason to keep that behavior or
I think for '' the behaviour's correct.
Not sure about undef, it doesn't strike me as a valid value. Thoughts,
anyone?
I think we can safely delete any trailing undef values. I agree for '' it
should append /s.
And it's as easy as:
### Remove trailing undef arguments.
pop @args
Good evening,
On 5/6/07 at 1:17 AM +0100, Matt S Trout
[EMAIL PROTECTED] wrote:
in lib/MyApp.pm:
use Catalyst qw/
+MyApp::Plugin::DebugMode
...
/;
The + is important.
Would you mind explaining that a bit further? Or pointing to
documentation? When is it appropriate to use the + and
On Tue, 2007-06-05 at 01:18 +0100, Matt S Trout wrote:
On Mon, Jun 04, 2007 at 12:55:38PM -0700, Dylan Vanderhoof wrote:
Oh, missed this email. Yours looks better than mine. =)
Except for being a performance hit on every single method call on $c (there's
a reason I keep telling people not
On Tue, Jun 05, 2007 at 08:40:52AM -0400, Matthew Pitts wrote:
On Tue, 2007-06-05 at 01:18 +0100, Matt S Trout wrote:
On Mon, Jun 04, 2007 at 12:55:38PM -0700, Dylan Vanderhoof wrote:
Oh, missed this email. Yours looks better than mine. =)
Except for being a performance hit on every
On Tue, Jun 05, 2007 at 10:30:49PM +1000, Charlie Garrison wrote:
Good evening,
On 5/6/07 at 1:17 AM +0100, Matt S Trout
[EMAIL PROTECTED] wrote:
in lib/MyApp.pm:
use Catalyst qw/
+MyApp::Plugin::DebugMode
...
/;
The + is important.
Would you mind explaining that a bit
FWIW
I just turn debug off, and do
export MYAPP_DEBUG=1; script/myapp_server.pl -r;
as I am developing. As that line is always there in the command buffer
it's no hassle. If I want I can have
BEGIN {
$ENV{MYAPP_DEBUG} = 1;
}
in test scripts.
Basically i find just using one mechanism is
Daniel McBrearty wrote:
FWIW
I just turn debug off, and do
export MYAPP_DEBUG=1; script/myapp_server.pl -r;
the -d option is so much easier to type :)
script/myapp_server.pl -d -r
-Brian
___
List: Catalyst@lists.rawmode.org
Listinfo:
Matt S Trout wrote:
On Mon, Jun 04, 2007 at 11:44:50AM -0400, Jim Spath wrote:
Is there any way to disable the validation of session ids? Seems like
it would be a somewhat useful option for those cases (like interfacing
with Facebook), where the session ids are pre-created.
sub
Good morning,
On 5/6/07 at 8:52 AM -0400, Matthew Pitts [EMAIL PROTECTED] wrote:
So...
use Catalyst qw/
+MyApp::Plugin::DebugMode
/;
will load the MyApp::Plugin::DebugMode package. Without the '+' it would
try to find Catalyst::Plugin::MyApp::Plugin::DebugMode.
Hope this helps.
I
if the catalyst base controller class provided an easy way to access $c
from a utility method (vs an action method, which receives $c
'automatically'), then i think plugins might be a little less popular.
some of my bits have ended up as controllers because i'd rather
if the catalyst base controller class provided an easy way to access $c
from a utility method (vs an action method, which receives $c
'automatically'), then i think plugins might be a little less popular.
some of my bits have ended up as controllers because i'd rather
oops,
On Tue, Jun 05, 2007 at 06:20:33AM -0700, Bill Moseley wrote:
Hum, I can see where a single '' would be useful if you wanted to do:
$x = $c-uri_for( '/path', '' ); # include trailing slash
$x .= 'foo'; # for /path/foo
Although I'm not sure why you wouldn't
On Tue, Jun 05, 2007 at 04:12:07PM +0100, Matt S Trout wrote:
Although I'm not sure why you wouldn't just use '/foo' in that case.
Nor am I, but for e.g. DAV presence of / is significat.
Ya, my static plugin will do a redirect to /foo/ if the request is /foo and
foo
is a directory. So
On Tue, Jun 05, 2007 at 08:04:03AM -0700, [EMAIL PROTECTED] wrote:
if the catalyst base controller class provided an easy way to access $c
from a utility method (vs an action method, which receives $c
'automatically'), then i think plugins might be a little less popular.
Well, you can already
#MyAPP name is NIC,
#NIC/lib/NIC/Model/NiscDB.pm
package NIC::Model::NiscDB;
use strict;
use base 'Catalyst::Model::DBIC::Schema';
__PACKAGE__-config(
schema_class = 'NiscDB',
connect_info = [
'dbi:Pg:dbname=niscdb;host=210.42.1**.***',
'user',
'password',
],
);
* Eden Cardim [EMAIL PROTECTED] [2007-06-04 22:15]:
sub auto : Private {
my($self, $c) = @_;
push @{$c-stash-{controllers}}, $self-namespace;
return 1;
}
# in Root
sub end : Private {
my($self, $c) = @_;
$c-stash{controller} = $c-stash-{controllers}[0];
}
Not that this
17 matches
Mail list logo