[mythtv-users] FaceBook Status Updates in MythTV

Brad DerManouelian myth at dermanouelian.com
Mon Dec 15 01:49:01 UTC 2008


On Dec 14, 2008, at 5:32 PM, Johan Venter wrote:

> Nice, I might use this myself. One thing did pop out at me though, if
> your logfile cannot be opened, your fallback of setting $lastRun to
> localtime() will be overridden and the error will still be thrown:
>
> open(LOGFILE, ".facebookosd_lastrun") or $lastRun = localtime();
> $lastRun = <LOGFILE>;

Good point.

> You're also not closing LOGFILE anywhere, but that's not a big deal  
> in a
> Perl script, although seeing as you make a point of closing LASTRUN at
> the end, you might want to be consistent :)

Oops. Perl lets me be really lazy.

> Also it might be better to use ~/.facebookosd_lastrun so it doesn't  
> just
> end up in whatever the current directory is.

I wasn't sure if it would interpret the ~/ correctly and I didn't want  
to hardcode a location. Does it?

-Brad



More information about the mythtv-users mailing list