Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options

Re: Handling braces with methods without arguments

by Jenda (Abbot)
on Sep 17, 2012 at 12:18 UTC ( #994027=note: print w/replies, xml ) Need Help??

in reply to Handling braces with methods without arguments

Perl doesn't care, but in some well known languages the form without the braces would not call the method, but rather return a reference to the method (JavaScript and C# come to mind, not sure about Java ... though in C# it's a bit more complicated than that ...). Mainly to prevent confusion for people using those languages, I'd recommend using the second syntax. I don't see any reason to include the space within the braces.

Enoch was right!
Enjoy the last years of Rome.

  • Comment on Re: Handling braces with methods without arguments

Replies are listed 'Best First'.
Re^2: Handling braces with methods without arguments
by McA (Priest) on Sep 17, 2012 at 12:54 UTC

    This is a nice argument which didn't come to my mind. Thank you. You forget python in the list.

    Best regards

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://994027]
Corion idly wonders about creating a series of HTTP requests. There seems to be no framework to generate a series of HTTP requests, like "try all these requests"
[Corion]: This is vaguely inspired by that list of "nasty" strings, which I'd like to replace among HTTP parameters, just to see whether the application crashes, but also for easy downloading of a list of URLs etc
[Corion]: Maybe I'll just conoct something using Algorithm::Permute to create an (OO) generator for such requests, or a simple function.
[Corion]: For testing I imagine one would want to test a random sampling of such "bad"/"unexpected" requests, while for downloading, one would want to generate them all in order, but not necessarily as a huge list

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (8)
As of 2017-01-16 15:40 GMT
Find Nodes?
    Voting Booth?
    Do you watch meteor showers?

    Results (151 votes). Check out past polls.