Beefy Boxes and Bandwidth Generously Provided by pair Networks Cowboy Neal with Hat
"be consistent"
 
PerlMonks  

Re^3: Custom cspec's in Net::Log4perl

by jimbojones (Friar)
on Apr 21, 2005 at 18:24 UTC ( [id://450221]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to Re^2: Custom cspec's in Net::Log4perl
in thread Custom cspec's in Net::Log4perl

Hi,

Sorry, I didn't read your code carefully enough.

# Check to see if we have a session. If so, load it's information. # If not, we need to create one and then cookie the user. #### JJ comment #### 'my' makes this lexically scoped #### change to 'our' or $::session to be visible #### in other scopes my $session = new CGI::Session("driver:DB_File", $cgi, {Directory=>'/u +sr/local/apache/htdocs/addressbook'}); # Init the logger Log::Log4perl->init("/usr/local/apache/htdocs/addressbook/log4perl.con +f");
you need to change my $session to something package scoped, like $::session. Then, it's somewhat of a global variable, so be carefull.

- j

Replies are listed 'Best First'.
Re^4: Custom cspec's in Net::Log4perl
by jpfarmer (Pilgrim) on Apr 22, 2005 at 15:18 UTC

    Excellent! It works now!

    Thank you very much for your help!

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://450221]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.