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:

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.


In reply to YAML file update issue under mod_perl by lihao

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.