borisdaeppen / EBook--MOBI

Ebook in MOBI format with Perl
https://metacpan.org/module/EBook::MOBI
14 stars 9 forks source link

using 3-args open and variable as file handle #12

Closed garu closed 12 years ago

garu commented 12 years ago

Hey Boris,

this is a small patch that uses 3 argument open() calls, and variables as file handles. This is the recommended way of handling files, since 2-argument open can lead to security problems, and using barewords as file handles has scoping issues that might trigger even weirder issues.

Beware, though: libgd is not building on my system so I can't test the patch. Please make sure you do :)

borisdaeppen commented 12 years ago

This patch is for a Palm module... it will make it more complicate to once completely remove this code and use the original lib? But yes... you are right with what you say... I think this is because the code is quite old.

borisdaeppen commented 12 years ago

I'll just commit it anyways. thx