On Fri May 09 12:58:15 2014, MSTROUT wrote:
Show quoted text> On Fri May 09 12:52:29 2014, SHARYANTO wrote:
> > I don't agree/disagree with 'err_mode' being a mistake. But from the
> > API user's point of view, I think it already lets me be explicit and
> > straightforward about how to handle the error (err_mode=>'quiet' "I
> > want to ignore errors", etc).
>
> I fail to see how a module-specific piece of wierd shit is any more
> straightforward than
>
> my $data = try { read_file($file) };
>
> Of course, I'd write that as
>
> use IO::All;
> my $data = try { io->file($file)->all };
>
> but I figure if you're still on prehistoric shit like File::Slurp
> you're probably not going to like IO::All's actually-having-features-
> ness :)
Nah, IO::All's too cute. I'm still on the good ol' functional bandwagon most of the time (which some might call prehistoric) :-p
I'll be replacing err_mode with eval { }, BTW.
Thanks all,
Steven