Hacker News new | past | comments | ask | show | jobs | submit login

It compiles with "use strict", and it's not abuse.

The reason you can't compile it is because guard is not defined, nor are cwd, cleanup, and the other placeholder functions I used. When you are relying on the parser to add parens for you (and let you omit "sub"), you have to have the function in scope. Compare:

    use strict;
    sub foo { bar }
And

    use strict;
    sub bar;
    sub foo { bar };



"abuse" was not the word I was looking for: I meant you're using Perl's syntactic freedom, and this trick does not work with PHP.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: