Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: How to call a perl function without its context?

by anonymized user 468275 (Curate)
on Jul 28, 2015 at 09:58 UTC ( [id://1136577]=note: print w/replies, xml ) Need Help??


in reply to How to call a perl function without its context?

I agree with browserUK on this one, but would add also:

- use 'use strict;' in your sources, to ensure no auto-declarations are allowed.

- avoid global variables where possible and use 'use constant;' for the cases where you want a global constant like pi to be immutable and ubiquitously available.

- use classes (and possibly Moo) to reduce the need for randomly scoped identifiers and to manage the scope and access to attributes.

One world, one people

  • Comment on Re: How to call a perl function without its context?

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (4)
As of 2024-04-23 22:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found