Keywords related to perl modules

by kalai 2008-11-22 20:40:02


Keywords related to perl modules
* do - turn a BLOCK into a TERM
* import - patch a module's namespace into your own
* no - unimport some module symbols or semantics at compile time
* package - declare a separate global namespace
* require - load in external functions from a library at runtime
* use - load in a module at compile time


Keywords related to classes and object-orientedness
* bless - create an object
* dbmclose - breaks binding on a tied dbm file
* dbmopen - create binding on a tied dbm file
* package - declare a separate global namespace
* ref - find out the type of thing being referenced
* tie - bind a variable to an object class
* tied - get a reference to the object underlying a tied variable
* untie - break a tie binding to a variable
* use - load in a module at compile time


* caller - get context of the current subroutine call
* import - patch a module's namespace into your own
* local - create a temporary value for a global variable (dynamic scoping)
* my - declare and assign a local variable (lexical scoping)
* our - declare and assign a package variable (lexical scoping)
* package - declare a separate global namespace
* use - load in a module at compile time


Keywords related to control flow of your perl program
* caller - get context of the current subroutine call
* continue - optional trailing block in a while or foreach
* die - raise an exception or bail out
* do - turn a BLOCK into a TERM
* dump - create an immediate core dump
* eval - catch exceptions or compile and run code
* exit - terminate this program
* goto - create spaghetti code
* last - exit a block prematurely
* next - iterate a block prematurely
* prototype - get the prototype (if any) of a subroutine
* redo - start this loop iteration over again
* return - get out of a function early
* sub - declare a subroutine, possibly anonymously
* wantarray - get void vs scalar vs list context of current subroutine call

Tagged in:

940
like
0
dislike
0
mail
flag

You must LOGIN to add comments