mason

Where can I find a Perl module for converting a Perl data structure into a JavaScript one?

e.g. (Mason code): 16 % # convert our @cti data structure into a javascript one 17 var cti = [ 18 % foreach my $cti_category (@cti) { 19 { 20 label: "<% $cti_category->{'label'} %>", 21 value: "<% $cti_category->{'value'} %>", 22 children: [ 23...

Is Mason a framework?

I've been having an agruement with a friend that Mason (Perl) is not a framework, but a templating language. I feel Mason for Perl does what JSP does for Java (as an analogy, not pure technical comparison). From what I know, JSP is not a framework and I feel neither is Mason. When I looked up wikipedia Mason (Perl), I see that the main s...

How can I extract <%doc> content from Mason?

Is there a tool like javadoc to extract the <%doc> content and the various methods with their parameters in Mason (Perl)? I'd like to add some basic documentation to components I'm writing and it would nice for the documentation to be auto-generated from the code. Edited to answer question from benrifkah: My intention was to look for a...

Is there good study material for Mason/Catalyst for an experienced .Net programmer?

I come from Asp.Net background and recently got assigned to a Perl web project for maintenance and enhancement. I just know that this project uses some stuff like Catalyst, Mason, Alzabo etc. There is plenty of time for me to learn. I need some good guidance on where to start. I'm looking for some good online resources (even webcasts)...

Why am I getting a panic with Perl 5.10, Mason, and Apache?

I'm developing an application using Perl 5.10, HTML::Mason, and apache 2.2. This is the first time I've used Perl 5.10 for a big project. I get a strange behavior every once in a while. The application dies with a very strange error: panic: attempt to copy value to a freed scalar b87acf34 at ... I guess my question is it Perl 5.10 be...

Using Apache::Session::Memcached with MasonX::Request::WithApacheSession

I'm trying to use Apache::Session::Memcached in an HTML::Mason project where I'm using MasonX::Request::WithApacheSession to handle my sessions. Unfortunately Apache will not launch when I plug in the Memcached module instead of the MySQL one. My custom handler looks something like this (a few snips here and there): my $ah = HTML::Mas...

How can I use JSON and Perl (HTML::Mason) to create dynamic web page with AJAX?

Hi everyone, I'm some kind of lost with the way i have to deal with Javascript, JSON and Perl and most of the examples are in PHP which is not helpfull for me. I have a page (called main.html) where i have a with data from MySQL and i have an option to delete a row by id. Then i have the Javascript sending the id to page apagar.html ...

"Can't call method "dir_path" on an undefined value" when running Mason component on the command line

Greetings, I'm trying to develop some tests for Mason components which requires running them on the command line instead of the web server. When I try this, I get an error: perl -MHTML::Mason::Request -MHTML::Mason::Interp -I./lib \ -e '$int = HTML::Mason::Interp->new( data_dir => "/home/friedo/cache", comp_root => "/home/friedo/comps"...

What is the best way to make login session with Perl's HTML::Mason?

Hi, I'm with some difficulties in make this. I have a login HTML form, and I want to know if the user and password match with the information in my MySQL server. What is the best way to do it? Thank you very much ...

Calling child class method from Base Class in Perl

I have module called Mobile::Auth to authorize and redirect to the login page. I wanted to access all methods from Site::Auth in my Mobile::Auth except a method '*redirect_to_login_page*', which I have specific one for my Mobile::Auth. I did something like this.. package Mobile:Auth; use base Site::Auth; sub redirect_to_login_page{ #g...

Good IDE or syntax highlighting editor for Mason?

Can anyone recommend some good IDEs or editors for Mason? At this point I'm just using VIM but it would be nice to have an editor that supports syntax highlighting as well as general syntax checking. There are plenty that support Perl of course, but when it comes to files with Mason and Perl intertwined the editors tend to get confus...

Redirect with Mason 1.0

Hi , i am using mason 1.0 and want to redirect the page to another URL. Is there any way to redirect ? Alternatively.. I have written following code in dbhandler which is giving error stating that $r undefined. Can you please help. $r->method('GET'); $r->headers_in->unset('Content-length'); $r->content_type('text/html'); $r-...

Why would Perl's CGI::cookie be able to set a cookie in IE, but not Firefox?

I have a bit of Perl CGI code which I'm trying to run in the project web space of a SourceForge account. The code is able to set a browser cookie just fine when talking to IE, but the cookie is not set when talking to Firefox. When I test with Apache on "localhost", both browsers work fine. It's only on the remote SourceForge URL that...