petdance / bobby-tables

bobby-tables.com, the site for preventing SQL injections
http://bobby-tables.com/
248 stars 85 forks source link

Switch to another module than File::Slurp #100

Open petdance opened 6 years ago

petdance commented 6 years ago

File::Slurp will break under Perl 5.30. Switch to something else, if not just writing my own read_file.

dz-at-tc commented 3 years ago

Hi @petdance , I wasn't sure whether eliminating a dependency entirely or clarity via retaining a dependency was the priority here, so I did it both ways. Or perhaps there is a door number three you had in mind? :)

dz-at-tc commented 3 years ago

Hey @petdance , so none of the above, eh?

We could squirrel away the do/local/<> idiom ugliness like so...

sub read_file {
    return do {local(@ARGV, $/) = shift; <>};
}

... if that makes any difference?

petdance commented 3 years ago

Hey @petdance , so none of the above, eh?

No, I just haven't had time to work on it yet. Other things have taken precedence. I appreciate the PR.

dz-at-tc commented 3 years ago

Ahhh, but of course (in my best Grey Poupon :)

Apologies for the line noise.