develooper Front page | perl.perl5.porters | Postings from March 2017

Re: The tricky issue of do()

Thread Previous | Thread Next
From:
Matt S Trout
Date:
March 30, 2017 22:26
Subject:
Re: The tricky issue of do()
Message ID:
20170330222604.GU12583@newagaton.scsys.co.uk
On Thu, Mar 30, 2017 at 08:26:49AM +0100, Dave Mitchell wrote:
> Well, the first example within the '=item do EXPR' section is
> 
>     do './stat.pl';
> 
> Is that what you meant?

Ok, that's already fixed then, cool.
 
> > and instead of just
> > 
> >   do "stat.pl" failed, '.' is no longer in @INC
> > 
> > the warning should be
> > 
> >   do "stat.pl" failed, '.' is no longer in @INC, did you mean do "./stat.pl" ?
> > 
> > ala the "did you need to install" error on require() failure.
> 
> I'd be reluctant to change the warning at this extremely late stage.

Well, the entire point of the warning was that this is most likely to affect
newbies or baby perl authors who don't understand what's going on and so
need hand holding through updating their code to match.

That's what this thread was about, basically - and the current warning is
barely more useful than nothing at all for that purposes.

As such, I'd be reluctant to ship without making the warning actually useful,
otherwise why did we bother adding it at all?

-- 
Matt S Trout - Shadowcat Systems - Perl consulting with a commit bit and a clue

http://shadowcat.co.uk/blog/matt-s-trout/   http://twitter.com/shadowcat_mst/

Email me now on mst (at) shadowcat.co.uk and let's chat about how our CPAN
commercial support, training and consultancy packages could help your team.

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About