$notice = 'please be sure that XXX is installed first'; print $notice;
sub notice { 'please be sure that XXX is installed first' } print notice;
sub print_notice { 'please be sure that XXX is installed first' } print_notice;
my feeling is that approach 3 is the worst because it is not re-usable - it did not couple the core capability to print with the core capability to define strings, hence this monolithic approach prohibits print_notice from being reused for other notification possibilities (unless print returns what it prints, but even then it looks funny to have the word print there in other contexts : length print_notice vs length notice vs. length $notice
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: print_notice or print $notice or print notice?
by chromatic (Archbishop) on Oct 14, 2001 at 21:37 UTC | |
|
Re: print_notice or print $notice or print notice?
by Maclir (Curate) on Oct 14, 2001 at 22:16 UTC | |
by wog (Curate) on Oct 14, 2001 at 22:24 UTC | |
by tstock (Curate) on Oct 14, 2001 at 23:53 UTC | |
by Anonymous Monk on Oct 14, 2001 at 22:34 UTC | |
|
Re: print_notice or print $notice or print notice?
by greywolf (Priest) on Oct 14, 2001 at 21:33 UTC | |
|
Re: print_notice or print $notice or print notice?
by grinder (Bishop) on Oct 15, 2001 at 13:14 UTC | |
|
Re: print_notice or print $notice or print notice?
by cLive ;-) (Prior) on Oct 15, 2001 at 09:27 UTC | |
|
Re: print_notice or print $notice or print notice?
by tadman (Prior) on Oct 18, 2001 at 03:28 UTC |