Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re^3: New Discovery!!! (sub call without parentheses)

by LanX (Sage)
on Dec 09, 2018 at 00:28 UTC ( #1226988=note: print w/replies, xml ) Need Help??


in reply to Re^2: New Discovery!!! (sub call without parentheses)
in thread New Discovery!!! (sub call without parentheses)

> I think Perl's the only language which doesn't enforce parens if a function is pre-declared

Ruby never does, but probably you wanted to say "if and only if" ?

The possibility to omit parenthesis is essential for many syntactic sugar and DSL approaches.

Compare "has" in Moose which looks like a keyword.

update

example

has 'first_name' => ( is => 'rw', isa => 'Str', );

Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery FootballPerl is like chess, only without the dice

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1226988]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (3)
As of 2022-01-24 01:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:












    Results (64 votes). Check out past polls.

    Notices?