Please don't use this against me. Check "perldoc -l". You can save a copy of a module, modify it to log someplace -- and then copy it back after everything is done.

Disclaimer: It is stupid. If you have to do it, use a local machine and don't blame me if it shoots you in the foot with a grenade rifle. If you do this on a server used by others, they will burn you in effigy (if you're lucky).

You might, as a start, check something I've really seen:

$bd{"name_$id"} = $name; $bd{"adr_$id"} = $address; etc;

I.e. it does a db access for every field! (It was the first job after uni for the guilty party and a long time ago, so I won't name him. No, not me. :-)

Update: madbombX had already written what I wrote, but better. Must have missed it at first reading. Sorry for wasting people's time. (To really insert a layer for a calling module, you could write a layer module and use that instead. The layer method use the real db module and implments the API you want to log -- use AUTOLOAD for the rest of the API. There must be multiple modules on cpan which already do this for OO and functional interfaces.)


In reply to Re: Profiling BerkeleyDB? by BerntB
in thread Profiling BerkeleyDB? by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.