'constant sub with return' oddity (5.10.1)

Discussion in 'Perl Misc' started by Rainer Weikusat, Dec 10, 2012.

  1. As I've just determined by testing, perl (at least 5.10.1) will inline
    a subroutine defined as

    sub V() { 0; }

    but it won't inline a subroutine defined as

    sub V() { return 0; }
     
    Rainer Weikusat, Dec 10, 2012
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Christopher M. Lusardi
    Replies:
    1
    Views:
    4,136
  2. Martin Magnusson
    Replies:
    2
    Views:
    537
    John Harrison
    Oct 8, 2004
  3. Tor Erik Soenvisen
    Replies:
    14
    Views:
    594
    Tim Roberts
    Nov 23, 2006
  4. Ben
    Replies:
    2
    Views:
    961
  5. Lawrence D'Oliveiro

    Death To Sub-Sub-Sub-Directories!

    Lawrence D'Oliveiro, May 5, 2011, in forum: Java
    Replies:
    92
    Views:
    2,172
    Lawrence D'Oliveiro
    May 20, 2011
Loading...

Share This Page