Hi, monks
I am using HTML::Mason + mod_perl + Apache2 under RHEL5, an YAML file is used for Marketing to maintain a complex data structure: a tree of questionnairs (HOH). The problem is that each time I update this YAML file, the change does not shown on live until I restart the Apache server. I tried:
- cleaning up client-side browser-cache which is not working
- seting up Apache2::Reload which is not working for YAML file
- deleting the cached HTML::Mason obj file does not work either
- no other Cache related code or HTTP configuration is setup on this YAML file
the YAML file is loaded with YAML::Syck:
my $TREE = LoadFile('/path/to/tree.yml');
The problem sounds to be from the server side. Is there any method in the mod_perl enviromental that I can Reload the YAML file without restarting Apache? i.e. something like Apache2:Reload ReloadTouchFile on Perl files.
thanks
lihao
Update: Never mind, after more testings, I found putting the YAML::Syck::LoadFile line into <%init> tag instead of <%once> tag solved my problem. this turns out to be just a problem on how to use HTML::Mason properly. thanks again.
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.