in reply to jQuery, Mason, perl??

Hello,

Some people would say that you are breaking the MVC pattern and mixing concerns by putting middle tier code in the view. I would bet that those same people spend a lot of time needlessly and inefficiently serializing data structures from one format to another just because they don't want to put a <%perl> ... <%/perl> tag in the javascript.

I think that as long as you are only reading from the application inside those tags, its gravy. It effectively turns perl and javascript into a single uberlanguage.

Regards,

Replies are listed 'Best First'.
Re^2: jQuery, Mason, perl??
by raisputin (Scribe) on Jul 14, 2009 at 19:45 UTC
    Thanks for the replies guys :)

    I have been fooling around with it and I think I need to either fix my apache config or declare the CSS differently because when I put the <%perl>...<%/perl>perl blocks in, the css no longer works properly, and in so doing I believe makes the javascript stuff not work either, but I cannot confirm that yet.

    Any ideas on what breaks my css? I am considering that it is most likely something with the mason stuff I am doing where I may need to call the js and the css differently, like in some kind of block <%filter>...<%/filter> maybe?

      Ah, figured it out. I had to add
      <%init> $r->content_type("text/css"); </%init>
      To the .css file