Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Re: scoped namespace?

by Anonymous Monk
on Jun 17, 2003 at 00:37 UTC ( [id://266346]=note: print w/replies, xml ) Need Help??


in reply to Re: scoped namespace?
in thread scoped namespace?

Thanks. This looks like it's exactly what I was looking for. Is this lexically scoped in such a way that if it happens in a method, the foo_name_space that is require'd in can't be seen by another mod_perl process?

Also, to clarify, here is a small example using Symbol as suggested:

#!/usr/bin/perl use strict; use warnings; use Symbol qw( delete_package ); + eval { do './foo_name_space.dat'; print "within eval: ",$foo_name_space::data,"\n" if $foo_name_space: +:data; delete_package('foo_name_space'); }; if( $@ ){ print "Oops [$!]","\n"; } if($foo_name_space::data){ print "outside eval: ",$foo_name_space::data,"\n" }else{ print "no such namespace\n"; }

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://266346]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (3)
As of 2024-04-25 12:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found