Plotinus has asked for the wisdom of the Perl Monks concerning the following question:
Anyway perlsub mentions prototypes and gives some good examples from which I infer that prototypes in perl subroutines are used to impose a data type on the attributes or arguments to the subroutine, i.e. as some kind of restriction to force data into either scalar, list, etc format. Is this correct and what other uses would prototypes have?
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: The purpose of prototypes in perl subroutines
by Joost (Canon) on Apr 13, 2005 at 09:27 UTC | |
Re: The purpose of prototypes in perl subroutines
by Anonymous Monk on Apr 13, 2005 at 10:58 UTC | |
Re: The purpose of prototypes in perl subroutines
by johnnywang (Priest) on Apr 13, 2005 at 17:23 UTC | |
Re: The purpose of prototypes in perl subroutines
by jjhorner (Hermit) on Apr 13, 2005 at 15:13 UTC | |
by Joost (Canon) on Apr 13, 2005 at 15:31 UTC | |
by jjhorner (Hermit) on Apr 13, 2005 at 15:32 UTC | |
by Joost (Canon) on Apr 13, 2005 at 15:45 UTC | |
by brian_d_foy (Abbot) on Apr 13, 2005 at 17:36 UTC | |
by jjhorner (Hermit) on Apr 13, 2005 at 17:41 UTC | |
|