On Thu, 2003-07-03 at 13:38, Peter Ensch wrote:
> I'm using CGI::Application and this part of the code happens inside
> the cgiapp_init() method which I'm overriding:
> 
> our $USERS : unique = "/path/to/users.dat";
> 
> sub cgiapp_init {
>  my $self = shift;
>  $self->param('users' => require ${\$USERS});
> }

That's confusing code.  Your users.dat file is a chunk of code that
returns a value that you use?  A little obscure, in my opinion.  And
what's that stuff with the ref/de-ref syntax for?

> So, to reiterate, I may write to users.dat on one transaction
> and read on another; the file contents is always up-to-date.

The file is up-to-date, or the param 'users' is?

Why don't you debug it a little by putting a warn statement in your
users.dat file that prints the process ID?  Then you can tell if it is
truly being executed more than once by the same process.

- Perrin

Reply via email to