"Michael C. Davis" wrote:

> At 09:58 PM 3/4/04 -0800, R. Joseph Newton wrote:
> >If you are using the Cache::FileCache package, the package-level functions
> >exorted by the package are available to you.  Any object blessed into this
> >package will have access to all methods defined in the package.  Remember
> that
> >anmespace is a general term which can be applied in different contexts.  I
> get
> >the impression that you are mixing the Perl namespace paradigm with the
> >namespace paradigm of some completely different system.
> >
> >Can you be more specific about your issue?
>
> Thank you for your reply.  I must apologize for not being more clear.
> Cache::FileCache allows one to specify a namespace within which cached
> objects are preserved, like so:
>
>   my $cache = new Cache::FileCache( { 'namespace' => 'MyNamespace',
>                                       'default_expires_in' => 600 } );
>
> ... or, at least, that's my assumption.  I haven't written any code with it
> yet, so I guess the namespace could be referring to a Perl namespace.

OK.  It lloks like you might benefit from thinking "hash name" in place of the
"namespaces" used in this package.  That or think of "package or lexical scope"
when considering Perl namespaces.  From what I see of the docs for Cache::Cache,
the conceptual base of the Cache::FileCache package, each anmespace is pretty
much equivalent to a hash--one that you can keep around indepentdent of your
programs execution.  I'm a bit fuzzy on the implementation details, but this
will do ffor separating them.

You might try some testing to see what works.  I probably will myself, but later
on.  At first blush, I would guess that a given namespace within a given cache
root will be available, to any Perl program using the module, by the names of
the cache root and hash/namespace.

The proof, though, isin the pudding.  Test.

Joseph


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to