Re: General Perl/Web questions



On Fri, Apr 28, 2006 at 10:21:43AM -0400, Leonid Grinberg wrote:

Alternatively, you can make a common_functs.pl file, where each one of
the above actions is performed in a subroutine (the file should only
have subroutines, and should not do anything outside of them (except
like use strict;)) and then, from within each file, you could do
something like

BEGIN
{
do ('common_functs.pl');
die if $@;
}

Is there some reason in particular you wouldn't use require instead?

It sounds, overall, like the OP is just looking to separate the Model
from the View and Controller functionality to some extent -- but doesn't
yet know it.

--
Chad Perrin [ CCD CopyWrite | http://ccd.apotheon.org ]
unix virus: If you're using a unixlike OS, please forward
this to 20 others and erase your system partition.
.



Relevant Pages

  • Re: The Expert Ruby Programmer
    ... unix virus: If you're using a unixlike OS, ... this to 20 others and erase your system partition. ...
    (comp.lang.ruby)
  • Re: Ruby Weekly News 26th February - 4th March 2007
    ... unix virus: If you're using a unixlike OS, ... this to 20 others and erase your system partition. ...
    (comp.lang.ruby)
  • Re: Bruce Eckel and Ruby
    ... I hit "dd" one time too few, and an extra line was left in the email by ... If you're using a unixlike OS, ... this to 20 others and erase your system partition. ...
    (comp.lang.ruby)
  • Re: Is this correct in perl?
    ... unix virus: If you're using a unixlike OS, ... this to 20 others and erase your system partition. ...
    (perl.beginners)