The following module was proposed for inclusion in the Module List:
modid: Readonly DSLIP: bdprp description: Create read-only scalars, arrays, hashes. userid: ROODE (Eric J. Roode) chapterid: 2 (Perl_Core_Modules) communities: RPI lily similar: constant.pm rationale: The built-in "use constant" pragma creates only scalars and lists; creates variables that have no leading $ or @ characters; creates only global variables. The variables it creates cannot be used as perl variable work-alikes in many ways (cannot be interpolated into strings; cannot take a reference to them). Also, it works only at compile time. Readonly.pm, by contrast, creates scalars, arrays, and hashes; these can be global or lexical; can be initialized at runtime; can be used as any other perl variables (except that they cannot be modified). Readonly.pm uses tied variables, so there is a performance penalty as compared to "use constant," but I believe it makes a useful complement to the pragma. enteredby: ROODE (Eric J. Roode) enteredon: Fri Mar 15 18:44:36 2002 GMT The resulting entry would be: Readonly bdprp Create read-only scalars, arrays, hashes. ROODE Thanks for registering, The Pause Team PS: The following links are only valid for module list maintainers: Registration form with editing capabilities: https://pause.perl.org/pause/authenquery?ACTION=add_mod&USERID=6e000000_827e3443f4f02cc8&SUBMIT_pause99_add_mod_preview=1 Immediate (one click) registration: https://pause.perl.org/pause/authenquery?ACTION=add_mod&USERID=6e000000_827e3443f4f02cc8&SUBMIT_pause99_add_mod_insertit=1