[prev in list] [next in list] [prev in thread] [next in thread] 

List:       apache-modperl
Subject:    Re: tie question
From:       Perrin Harkins <perrin () primenet ! com>
Date:       2000-07-31 22:47:50
[Download RAW message or body]

On Mon, 31 Jul 2000, Matt Sergeant wrote:

> On Mon, 31 Jul 2000, dreamwvr wrote:
> 
> > hi,
> >    why is tie considered not very efficient i use it often.. what is 'a'
> > much better way?
> 
> tie isn't very efficient simply because the code behind it (in the core of
> Perl) is fairly complex and slow. Theres not a lot that can be done to
> improve it according to Ilya. I don't think there _is_ a better way - tie
> is a very specific requirement, and usually its "fast enough". Remember
> that STDOUT is tied to the request object in mod_perl...

It's possible to call the object methods directly, and this will be faster
than using the tied interface.  Sometimes you can't do this because you
don't want to touch the code that uses the tied interface, but I've done
this successfully with Apache::Session and some other Tie:: modules
before.

Read the perltie manpage or open up the module you're using if you want to
see how to do it.

- Perrin

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic