Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re^2: Useless use of a constant (ict) in void context

by mje (Curate)
on Nov 15, 2013 at 13:50 UTC ( #1062742=note: print w/replies, xml ) Need Help??


in reply to Re: Useless use of a constant (ict) in void context
in thread Useless use of a constant (ict) in void context

As I said (and the error says) the suspect line is line 3 in Test::NoWarnings and it does contain use strict. I've pasted it below:

package Test::NoWarnings; use 5.006; use strict; use warnings;

Replies are listed 'Best First'.
Re^3: Useless use of a constant (ict) in void context
by hdb (Prior) on Nov 15, 2013 at 13:52 UTC

    Interestingly, line 3 is use 5.006;.

      If I delete the use 5.006; so it is now as below, it now gives:

      package Test::NoWarnings; use strict; use warnings; use Carp ();

      Useless use of a constant (rnings) in void context at I:/strawberry-perl-5.14.2. 1-32bit-portable/perl/vendor/lib/Test/NoWarnings.pm line 3.

      At the risk of sounding offensive (not intended). If you typed your code the way you typed your question:

      strawberry-perl-5.14.2.1-3 2bit-portable/perl/vendor
      (note the 2bit-portable).

      I'm inclined to go with Rolf (LanX), and suggest it was probably a typo.

      Again. No offense intended.

      --Chris

      #!/usr/bin/perl -Tw
      use Perl::Always or die;
      my $perl_version = (5.12.5);
      print $perl_version;

        That was cut and pasted from a windows terminal and it seems it cut the newline and replaced it with a space - I don't usually use Windows. Anyway, the code in question was not typed in by me.

        If I comment out the "Package Test::Nowarnings;" line and retype it the problem goes away but I cannot see any difference between the original and what I typed. I'd run it through od if this wasn't Windows.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1062742]
help
Chatterbox?
[Corion]: ambrus: Yeah, at least that's what I think I'll start with. A timer and potentially the dummy IO function that never is ready
[ambrus]: That only lets you invoke the main loop from Prima->run;, not from AnyEvent->condvar- >recv; but that shouldn't matter
[Corion]: ambrus: Details ;)
[ambrus]: Like <c>{ package AnyEvent::Impl:: Prima; use Prima; sub io{ my($s,%r)=@_; Prima::File->new( file=>$r{fh},mask =>("w"eq$r{poll}? fe::Write():fe:: Read())|fe:: Exception,onRead =>$r{cb},onWrite =>$r{cb}, onException=>$r{cb }) } sub timer { ... } push @AnyEvent::REGI
[ambrus]: argh, too long, let me try on scratchpad

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (9)
As of 2016-12-08 12:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (141 votes). Check out past polls.