Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
While attempting to convert some code to run on a Debian/Stable box†, I have encountered an error that has me truly stumped.
I have a script that generates static HTML pages using data from a dbm, and templates used by the dynamic ortions of the site - thus it needs to use HTML::Mason and MLDBM at the same time. However, the line that ties the dbm:
tie %Data, 'MLDBM', 'linkdata.dbm', O_RDONLY, 0640 or die "Tie Failed +on 'linkdata.dbm': $!\n";
generates the following error:
MLDBM error: Second level tie failed, "No such file or directory" at . +/dbmreader_mason.pl line 34 Tie Failed on 'linkdata.dbm': No such file or directory
The file is clearly there; I can see it, and wrapping the offending line in 'if (-e $filename) { ... }' still causes it to be executed. There is no NFS or symlink weirdness going on, the file has the right permissions, and it happens irrespective of whether I use an absolute path or not.
I know this is a Mason issue, as removing all references to HTML::Mason causes the script to run without errors (though also without doing anything useful).
I have a vague recollection of something similar happening when the options given to MLDBM in the script are different from those in Mason's configuration ('/etc/apache/mason_handler.pl', iirc) - but in this case, both are using DB_File and Storable.

Anyone experienced anything similar or have any advice?

†: This means I'm using Perl 5.053, Mason 0.72-1 and MLDBM 2.00-6. Unforunately I don't have root on this machine, so installing newer versions of packages is not an option.

In reply to HTML::Mason and MLDBM by kilinrax

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



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (8)
As of 2024-03-28 09:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found