Ice Age 2

So, one of Garion’s favorite birthday presents was tickets and candy for “Ice Age 2”:;fc=2;ft=21;fm=1 . What a winner. Not too much to really say, yes it is a sequel. If you liked the first one, you’ll love this one. Plenty of new comedy on now established characters. Enough jokes for the adults, and it sure kept my son laughing the whole time. An excellent movie to take the kids to, and still enjoyable for just adults.

Methods in a Regex

So I had some old code I was debugging, trying to figure out why something wasn’t triggering when I came upon this:

grep /$event->pkgevent/, @finished_ids

That is when something twitched in the back of my head. I’m sure everybody has felt something similar at some point in there life. It’s the feeling you get when you realize something is quite _wrong_, and it should have been obvious to you.

If you don’t know what’s going on there, it is _trying_ to check and see if the $event object’s pkgevent value (via an accessor method) is inside an array called finished_ids. Here’s the problem, it’s using pattern detection, and inside the pattern, it is *not* running the subroutine. It needed to be:

grep /${\$event->pkgevent}/, @finished_ids

which marks the method as code, and says run that first, then use the value for the pattern. Of course, this is just if you want to use the method inside the pattern (barring other stuff), instead of pulling the value out to search in another manner.

Props to “HarleyPig”: for remembering the ${\ } syntax off the top of his head.


Finally a toolkit I can wholeheartedly support…

“SQL on Rails”:

Make sure to watch the screencast…. ’cause *everybody* is doing those nowadays.