originalgeek has asked for the wisdom of the Perl Monks concerning the following question:

I'm using Storable in conjunction with Cache::Memcached::Fast. I need to store CODE references, so I use $Storable::Eval = 1; before getting stuff from memcached (and $Storable::Deparse = 1; before setting). Only one problem, when I fetch, Storable craps all this noise to my log files that looks like this excerpt (actual logging is about 16K per fetch operation):
SV = RV(0xb5899e8) at 0xb5899dc REFCNT = 1 FLAGS = (ROK) RV = 0xb5899e +c SV = PVHV(0xb56c3d4) at 0xb5899ec REFCNT = 1 FLAGS = (OBJECT,SHAREKEYS) STASH = 0x9f713ec "DBI::st" ARRAY = 0xb58a854 (0:3, 1:2, 2:3) hash quality = 82.1% KEYS = 8 FILL = 5 MAX = 7 RITER = -1 EITER = 0x0 Elt "TraceLevel" HASH = 0x825c4531 SV = IV(0xb589a08) at 0xb589a0c REFCNT = 1 FLAGS = (IOK,pIOK) IV = 0 Elt "FetchHashKeyName" HASH = 0xad2a2131 SV = PV(0xb519d8c) at 0xb5899fc REFCNT = 1 FLAGS = (POK,pPOK) PV = 0xb58a714 "NAME"\ CUR = 4 LEN = 8 Elt "ImplementorClass" HASH = 0xaf0250d2 SV = PV(0xb57d8fc) at 0xb589a2c REFCNT = 1 FLAGS = (POK,pPOK) PV = 0xb583084 "DBD::Pg::st"\ CUR = 11 LEN = 12
Obviously, at 16K worth of log file per transaction, there is no way I can use this in a production web app. Any help is greatly appreciated.
  • Comment on Storable emitting unwanted log information, a lot. Can you help me make it stop?
  • Download Code

Replies are listed 'Best First'.
Re: Storable emitting unwanted log information, a lot. Can you help me make it stop?
by ikegami (Patriarch) on May 06, 2010 at 17:44 UTC
    You can't serialize database statements (well, any kind of handle). Start by not doing that :)
Re: Storable emitting unwanted log information, a lot. Can you help me make it stop?
by chromatic (Archbishop) on May 06, 2010 at 18:27 UTC

    Is $Storable::DEBUGME set?

      I don't know, but I'm going to find out...thanks. I know I did not explicitly set it.