On 30 Oct 2012, at 15:47, Hugh Barnard wrote:
> Hi
>
> On measurement in general, I'd recommend: Devel::NYTProf::Apache ; there's a
> write up here:
> http://www.slideshare.net/bobcatfish/profiling-with-develnytprof
>
++
Personally, I'd not be using mod_perl if I could help it, but NYTProf
On 30 Oct 2012, at 15:03, Craig Chant wrote:
>
> Plus I always felt loading an entire module to re-arrange a tiny string seems
> a bit OTT?
Yes, it is :)
If you know that re-arranging a string is all you're ever going to be doing,
then sure - don't' do that..
However, usually when you're dea
On 30 Oct 2012, at 14:39, Craig Chant wrote:
> Well I opted for putting my globals (methods and constants) in MyApp.pm
>
> It's working grand with $c->myMethod or $c->MY_CONSTANT
>
> I use to have them working as a bareword within my application , but
> $c->MY_CONSTANT is just as easy!
It's a
On 30 Oct 2012, at 14:03, Craig Chant wrote:
> So it seems it’s OK to whack them in the main MyApp.pm , here is an example
> of what is currently in a ‘MemberGlobs.pm’, which is ‘required’ in 90% of all
> the perl scripts.
> I’m forever having to switch between UK dates and USA dates so have
, hand-rolled seems intuitively better in some cases.
>
>
> Regards,
>
>
>
> Craig.
>
>
>
> *From:* Hugh Barnard [mailto:hugh.barn...@gmail.com]
> *Sent:* 30 October 2012 15:47
> *To:* The elegant MVC web framework
>
> *Subject:* Re: [Catalyst] Global
Perhaps it is feasible for you to bypass object inflation.
1)
"DBIx::Class is not built for speed, it's built for convenience and
ease of use, but sometimes you just need to get the data, and skip the
fancy objects."
http://search.cpan.org/~frew/DBIx-Class-0.08200/lib/DBIx/Class/Manual/Cookbook.p
.barn...@gmail.com]
Sent: 30 October 2012 15:47
To: The elegant MVC web framework
Subject: Re: [Catalyst] Global 'helper' methods
Hi
On measurement in general, I'd recommend: Devel::NYTProf::Apache ; there's a
write up here:
http://www.slideshare.net/bobcatfish/profiling-with-d
'shared' hosting I was using.
> >
> > Plus I always felt loading an entire module to re-arrange a tiny string
> seems a bit OTT?
> >
> > Dunno, what's the overhead of DateTime?
> >
> > Craig.
> >
> > -Original Message-
> > From:
f DateTime?
>
> Craig.
>
> -Original Message-
> From: Lukas Thiemeier [mailto:spamcatc...@thiemeier.net]
> Sent: 30 October 2012 14:52
> To: catalyst@lists.scsys.co.uk
> Subject: Re: [Catalyst] Global 'helper' methods
>
> You can also define your constants in &qu
atc...@thiemeier.net]
Sent: 30 October 2012 14:52
To: catalyst@lists.scsys.co.uk
Subject: Re: [Catalyst] Global 'helper' methods
You can also define your constants in "YourApp/Constants.pl", and "use"
YourApp::Constants wherever you need them.
YourApp/Constants.
On Tue, Oct 30, 2012 at 7:03 AM, Craig Chant
wrote:
> So it seems it’s OK to whack them in the main MyApp.pm , here is an
> example of what is currently in a ‘MemberGlobs.pm’, which is ‘required’ in
> 90% of all the perl scripts.
>
Be careful with that approach. I'd stick with method that need
$c->MY_CONSTANT is just as easy!
>
> Many thanks for all the input and help, it really is appreciated.
>
> -Original Message-
> From: Lukas Thiemeier [mailto:spamcatc...@thiemeier.net]
> Sent: 30 October 2012 13:56
> To: catalyst@lists.scsys.co.uk
> Subject: Re
is appreciated.
-Original Message-
From: Lukas Thiemeier [mailto:spamcatc...@thiemeier.net]
Sent: 30 October 2012 13:56
To: catalyst@lists.scsys.co.uk
Subject: Re: [Catalyst] Global 'helper' methods
Hi Craig,
Writing helpers in your main App.pm and using roles is not e
ailto:mita...@gmail.com]
Sent: 30 October 2012 13:52
To: The elegant MVC web framework
Subject: Re: [Catalyst] Global 'helper' methods
Hello Craig,
See the last answer. abraxxa describes it pretty well. Are those catalyst
specific? Probably provide an example so someone could provide a better
s
Hi Craig,
Writing helpers in your main App.pm and using roles is not either-or.
Roles are one possibility to modify your classes in a reusable way.
If your helpers are really global, which means that they are used by
all, or almost all your controllers, I would put them into your main
applicatio
15 matches
Mail list logo