perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Felipe de Jesús Molina Bravo" <fjmolinabr...@gmail.com>
Subject Re: share objects
Date Thu, 03 Apr 2008 20:17:47 GMT
2008/4/3, Perrin Harkins <perrin@elem.com>:
>
> On Thu, Apr 3, 2008 at 1:33 PM, Felipe de Jesús Molina Bravo
> <fjmolinabravo@gmail.com> wrote:
> > > It depends on what you mean by share.  You can create a simple perl
> > > object in startup.pl and access it from all processes later, but if
> > > you change it in one process, the change will not be seen in the
> > > others.  With objects that contain open sockets, file handles, or XS
> > > structures, you usually can't share them at all.
> >
> > Is when they can be shared?  and if my file handle is open of "ro"  ....
> it
> > can share between process?
>
>
> It can be done, but it's tricky.  When you try to use one file handle
> from multiple process it gets confused about the location in the file.
>   If you really need to do it, read about shared file handles in
> Programming Perl or your favorite Unix reference.
>
>
> - Perrin
>

ok ...thanks a lot


regards
felipe

Mime
View raw message