Archive for March, 2008

CPAN via a Pipe

Sunday, March 30th, 2008

I’ve tried to monitor the CPAN recent feed to keep up with updates to modules I use and find other useful modules, but the volume of updates has gotten to much to handle. While it’s great to see so many updates, I simply don’t have the time to look through them all.

Apparently, I’m not the only one with the problem as a while back NotiCPAN was created to notify users of updates to specific modules. Problem is you must select each individual module you’d like to watch.

In the sprit of being lazy, I thought up a way to monitor what I’d like via a Yahoo Pipe. With it I’m able to enter the types of modules I’m interested in and subscribe to it in Google Reader. I like the fact that I can watch all Catalyst modules by simply specifying that I want “Catalyst” in the title or if I specify “YAML::Tiny” it’ll watch that one module for now and if others enter that namespace it’ll automatically pick those up.

It’s a very simple concept, but has helped me a great deal.

Feel free to check out the pipe and I’d love to hear of other uses.

jQuery and hidden items

Saturday, March 29th, 2008

Doing some resent work with jQuery a div that is initially hidden from the user, I went round in cirlces when I kept getting nothing when trying to get the div’s margin information via:

$('#myitem').offset()

I kept getting zero returned for the top and left margins. What I needed to do was to show() the div:

$('#myitem').show().offset().hide()

This allows me to get the margins, but ultimately keeps the div hidden from the user.

Hopefully, documenting this here will help someone if they run into in the future, or it’ll help me the future me if I ever forget.