develooper Front page | perl.perl6.users | Postings from June 2018

Re: a `pe4rl6 -c` error to fix

Thread Previous | Thread Next
From:
Todd Chester
Date:
June 21, 2018 07:25
Subject:
Re: a `pe4rl6 -c` error to fix
Message ID:
8a1aa8b8-d5ef-225d-46e3-6e0b3d11aada@zoho.com

>> <mailto:ToddAndMargo@zoho.com>> wrote:
>> 
>> 
>> 
>>     > On Tue, Jun 19, 2018 at 10:50 PM, Todd Chester <ToddAndMargo@zoho.com <mailto:ToddAndMargo@zoho.com>> wrote:
>>     >> Dear Perl Developers,
>>     >>
>>     >> Would you please fix this `perl6 -c` checker error?
>>     >>
>>     >> $ perl6 -v
>>     >> This is Rakudo version 2018.05 built on MoarVM version 2018.05
>>     >> implementing Perl 6.c.
>>     >>
>>     >>
>>     >> The checkers passes this line with Syntax OK
>>     >>
>>     >>       $ReturnStr, $CurlStatus = CurlDownloadFile $FileAddr, $BaseFileName,
>>     >> %MaxTime<'MaxTime4'>;
>>     >>
>>     >>
>>     >> But actually running the line throws
>>     >>
>>     >>       Useless use of $ReturnStr in sink context
>>     >>
>>     >>
>>     >> The checker should throw an error if the line is "useless"
>>     >>
>>     >> Many thanks,
>>     >> -T
>> 
>> 
>>     > On 06/20/2018 11:46 AM, Will Coleda wrote:
>> 
>>         It's a warning, not an error.
>> 
>> 
>>     Indeed it is.  "-c" does warnings too and it should
>>     show in "-c" too.
>> 
>> 


On 06/20/2018 10:58 PM, Brent Laabs wrote:
> -c does compile time warnings, not runtime warnings.  You can't make 
> runtime warnings appear at compile time without using a BEGIN block.
> 
> On Wed, Jun 20, 2018 at 9:59 PM, Todd Chester <ToddAndMargo@zoho.com 

What is a BEGIN block?

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