I was just in a room with three competent, professional Perl developers, all of whom agreed that you can’t strip whitespace from both ends of a string in a single regexp. Read the rest of this entry »
Stripping whitespace from both ends of a string…
March 1st, 2010Configuration Files and Config::JFDI
December 10th, 2009
rx prednisone
buy prednisone
order prednisone
what are the side effects of prednisone 10 mg
cheap prednisone
prednisone canada
purchase prednisone
prednisone 50mg buy
price of prednisone
prednisone overnight
order prednisone without prescription
mail order prednisone
risk of taking 40 mg of prednisone and found out you are pregnant
buy prednisone online
price of prednisone
mexico prednisone sale
prednisone 20 mg online
prednisone online no rx
order prednisone online
prednisone shipped fedex
order generic prednisone
no prescription prednisone
where can i buy prednisone
prednisone no prescription
mexico pharmacy prednisone
I wrote this some time ago, and it sat in the queue and got stale. I’ve mentioned one place I’m not using Config::JFDI, but I’m using it other places and I thought it desrved a mention.
I mentioned my old framework had a way to infer which configuration file to use by examining the environment it was running in. I’ve moved to the Catalyst Way of things (more or less) and that will make things easier. A bunch of my old code can go away.
I have some useful tools to do things which do like to read the config file, too. They used the same code. They now use Config::JFDI. It reads config files the same way Catalyst does, and gives you a very similar $config object you can use to look at things with.
I did have to dig in to the sources to get it to work right, even though it’s pretty well documented.
Calling Catalyst functions outside Catalyst.
November 30th, 2009Several times, I’ve wished I could write command-line tools to manage Catalyst applications. Those tools, invariably, needed to call some of the Catalyst functions, or at least get to the database.
cheap tramadol
cheap tramadol
cheap tramadol
cheap tramadol
cheap tramadol
cheap tramadol
cheap tramadol
cheap tramadol
cheap tramadol
cheap tramadol
cheap tramadol
cheap tramadol
cheap tramadol
cheap tramadol
cheap tramadol
cheap tramadol
cheap tramadol
cheap tramadol
cheap tramadol
cheap tramadol
cheap tramadol
cheap tramadol
cheap tramadol
cheap tramadol
cheap tramadol
cheap tramadol
cheap tramadol
cheap tramadol
cheap tramadol
cheap tramadol
cheap tramadol
cheap tramadol
cheap tramadol
cheap tramadol
cheap tramadol
cheap tramadol
cheap tramadol
cheap tramadol
cheap tramadol
cheap tramadol
cheap tramadol
cheap tramadol
cheap tramadol
cheap tramadol
cheap tramadol
cheap tramadol
cheap tramadol
cheap tramadol
cheap tramadol
cheap tramadol
cheap tramadol
cheap tramadol
cheap tramadol
cheap tramadol
cheap tramadol
cheap tramadol
cheap tramadol
cheap tramadol
cheap tramadol
cheap tramadol
cheap tramadol
cheap tramadol
cheap tramadol
cheap tramadol
cheap tramadol
I had struggled with Config::JFDI and tried to create DBIx::Class objects outside of the Catalyst models so they could be used standalone. This sort of worked, but wasn’t as easy as I wanted.
I found a way, and it’s so simple it hurts. I can’t help think this is one of those things the Catalyst team will read and think, “Well, duh!” but it was never clear to me and I struggled with it for months. Read the rest of this entry »
Adding Actions to a Catalyst app at testing time
November 15th, 2009In response to a question I posted on the Catalyst list, Tomas Doran (among other suggestions) posted a beautifully devious way to add additional capabilites to your application for test purposes.
When you’re testing with Catalyst::Test and running a local test, you don’t actually fire up a web server and talk over the wire. It loads your program’s library in to the test script, and calls the functions with the same objects given to it by the other servers.
Your Cat app runs, but all as functions in your program.
Since this is your program - and a test script is just a funny Perl program - you can load libraries and add additional things to the namespace.
Testing Catalyst Session Data
November 15th, 2009Tomas Doran pointed out the other day, in a post on the Catalyst mailing list, that you could manipulate the session data between test calls if you needed to.
My original question was about manipulating what user was logged by playing with the cookie cache, but it should apply to any value in the session. You could check them, to see that the internal state of your program is what you think it is, or you could fiddle with them, to test that it does the right things.
Stealing From the Experts: Look at Their Tests!
November 15th, 2009I don’t know why this didn’t come to me quicker, but I got some good advice on the Catalyst mailing list. It boils down to “look at how other people do it”, which I usually think of.
What I’d never thought of before was to look at their test cases for ways to do it.
Both Tomas Doran and Peter Karman made good suggestions of places to look for things that would help with my authentication issue.
Cookies and Catalyst::Test
November 15th, 2009The other day, I asked a question over on the Catalyst mailing list which spurred on some discussion. Some of that discussion showed up with an example of how to check for cookines on the result of a Catalyst::Test operation.
There seems to be a way to jigger it in, but adding some real support for it might be better. Others seemed to agree.
How? What’s best?
generic viagra in british columbia Order Viagra can i take viagra
Reinstalling Perl.
October 26th, 2009The break in my blogging was to start a new job. It’s kept me incredibly busy. I’m now a “Senior Infrastructure Architect” and being paid to write and maintain complex Perl scripts. It means lots more things in Perl to learn and see, but may limit what I can blog about, as I have to be careful of the NDA. I’m going to try and get back to this blog, though.
I reinstalled Perl the other day. It was no trouble; it came with my Linux distribution.
Then I had to reinstall all the missing modules.
That should be easy! I typed ‘autobundle’ in CPAN before I upgraded, and it wrote out a Bundle file. All should be well! I should just have to type “perl -MCPAN -e ‘install Bundle::Snapshot_2009_09_09 and let it go do what it needs to do.
Pity it doesn’t work that well.
Recursive Dependencies in CPAN
June 20th, 2009I’ve been quiet lately, as I’ve had hardware problems and haven’t done much development on my spare spare machine. Finally got a new one, and am installing everything.
Autovivification bit me today
May 26th, 2009For the first time in more than five years, I got bit by autovivification. It’s one of those odd quirks of Perl that I’d read about, and heard the problems with but never bumped in to them.
