On Mon, Dec 10, 2001 at 08:49:32PM +0100, Jotham Read wrote:
>

[...]

> If one session require()s something, then another session re-require()s it,
> does it get 'reloaded' or what?  I have to be consious about speed.

No.  perldoc -f require says:

         Otherwise, demands that a library file be included
         if it hasn't already been included.  The file is
         included via the do-FILE mechanism, which is
         essentially just a variety of "eval".  Has seman-
         tics similar to the following subroutine:

             sub require {
                 my($filename) = @_;
                 return 1 if $INC{$filename};
                 my($realfilename,$result);
                 ITER: {
                     foreach $prefix (@INC) {
                         $realfilename = "$prefix/$filename";
                         if (-f $realfilename) {
                             $INC{$filename} = $realfilename;
                             $result = do $realfilename;
                             last ITER;
                         }
                     }
                     die "Can't find $filename in \@INC";
                 }
                 delete $INC{$filename} if $@ || !$result;
                 die $@ if $@;
                 die "$filename did not return true value" unless $result;
                 return $result;
             }

> > Making UT::Session data driven may help, but I don't know enough about
> > it to say for sure.
> 
> What do you mean by data driven?

It may be appropriate for UT::Session to act like a generic machine.
If the machine treats the data it's given as instructions, it can do a
lot more with less code.

-- Rocco Caputo / [EMAIL PROTECTED] / poe.perl.org / poe.sourceforge.net

Reply via email to