Try inheritance, e.g. in your autohandler
<html> <head> <style> /* default styling here */ <& SELF:.add_style &> </style> </head> <body> ... <% $m->call_next %> ... </body> </html> <%method .add_style> </%method>
Then in another component (say mylist.html) that inherits from the autohandler
... <%method .add_style> /* custom styling here */ </%method>
This way when mylist.html is requested, the custom css will get added within the html header.

Alternatively you could build the a css file dynamically and let Mason handle it. E.g. in each component where you want to add CSS to that of the overall page, you could write the css to a database table, and then when Mason serves the css page, it could query the database for the css and generate an appropriate css page.

I'll also highly recommend the Mason book if you haven't been reading it.


In reply to Re: Output should have multiple segments by Arunbear
in thread Output should have multiple segments by John M. Dlugosz

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.