Questions tagged [mason]

HTML::Mason, or Mason for short, is a Perl-based templating system for generating dynamic HTML or other content.

HTML::Mason or it's successor Mason 2 (simply called Mason), is a Perl-based templating system for generating HTML or other content.

Its features make it a suitable backend for high load sites serving dynamic content, such as online newspapers or database driven e-commerce sites.

Official home page: http://www.masonhq.com/

Mason book: https://masonbook.houseabsolute.com/

143 questions
4
votes
2 answers

How to get QUERY_STRING in perl mason CGIHandler?

I need to do some maintenance on a Mason site that was working well at one hosting company, but needs to be moved to another. The new hosting company doesn't support ApacheHandler, so I'm changing the code to CGIHandler. Unfortunately, I no longer…
Alain Collins
  • 16,268
  • 2
  • 32
  • 55
4
votes
1 answer

.mpl extension in URL : Perl related technology?

I've seen a company using this kind of URLs http://www.foob.ar/cgi-perl/bar.mpl. It seems they use Perl in the back-end, but I would like to know which technology (framework, modules, etc.) is supposed to be involved by the .mpl extension ? I…
smonff
  • 3,399
  • 3
  • 36
  • 46
4
votes
2 answers

Perl: show used subroutines

In some project ( Mason ) there is a lot of perl modules (> 200). Really used only 5-10% from this code. How i can look, which subroutines is used (or unused)?
krevedko
  • 4,187
  • 1
  • 17
  • 13
3
votes
1 answer

map perl looping from value

I am not able to understand why following code is not working. <%method getvivekBox> <%args> $BoxName <%perl> return { type => 'vivek', }; <%method getAll> <%args> $BoxGroup …
Vivek Goel
  • 22,942
  • 29
  • 114
  • 186
3
votes
1 answer

Mason2 wrong utf8 encoding with the "go" method

Bit long question, because AFAIK Poet/Mason2 isn't the very often used framework - so I'm trying to be detailed. Two years ago I asked a question how to make Mason2 utf8 clean. As far as i know, here isn't much new in Mason/Poet in this field - and…
kobame
  • 5,766
  • 3
  • 31
  • 62
3
votes
0 answers

Using Mason components as Roles

With the new Mason 2 introducing Moose method modifiers like around, augment, override, etc., I'd like to be able to start writing components that acted as Moose roles. As far as I can tell, it's not supported out of the box, but has anyone tried…
Ryan
  • 672
  • 1
  • 6
  • 16
3
votes
1 answer

Moose in Mason - default array value not set

I have some fields in a component (included in base component by <& file.mi &>, nothing fancy here) and I can't figure out how to set default value for an array. My deffinition look like this: <%class> has 'field' => (is => 'ro', isa =>…
Liberat0r
  • 1,852
  • 2
  • 16
  • 21
3
votes
1 answer

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

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…
Davidslv
  • 634
  • 1
  • 7
  • 18
3
votes
3 answers

Perl, Starman Unicode wide character in syswrite at

I have this word comЯade but I can't print it in HTML because of the Russian Я... I tried: $HTML::Entities::char2entity{'Я'} = 'Я'; $HTML::Entities::char2entity{'1071'} = 'Я'; $HTML::Entities::char2entity{'ï'} = 'Я'; $str…
mamesaye
  • 2,033
  • 2
  • 32
  • 49
2
votes
1 answer

Defining global variables in perl Mason Framework

I recently came across a problem: how to define a global variable in perl Mason Framework ? I need to define a variable and assign a value to it which will be visible from all Mason components, but all my attempts happen to be unsuccessful, because…
Grigor Gevorgyan
  • 6,753
  • 4
  • 35
  • 64
2
votes
2 answers

Error using Mason as stand-alone templating language

G'day, I'm trying to use HTML::Mason 1.35 as a stand-alone templating language to generate emails. Consider the following test script: #!/usr/bin/perl use strict; use warnings; use HTML::Mason::Compiler; use HTML::Mason; use Data::Dumper; my…
Gaurav Dadhania
  • 5,167
  • 8
  • 42
  • 61
2
votes
1 answer

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…
marghi
  • 233
  • 1
  • 9
2
votes
1 answer

Accessing Json objects in perl and reuse it in another JSON

I have received arguments in my mason handler which looks in the following format: $data = { 'cacheParams' => 0, 'requests' => { 'locationId' => 1, 'uniqueId' => [ 'ABC', 'DEF', 'XYZ' …
user1692342
  • 5,007
  • 11
  • 69
  • 128
2
votes
1 answer

Printing Contents of arguments in Mason

I have a mason file which accepts arguments <%args> $data When I use FLLogError to print $data it prints HASH(0x853e6654). Is there a way to print the contents of this hash so that I can verify that it is getting the required parameters?
user1692342
  • 5,007
  • 11
  • 69
  • 128
2
votes
2 answers

In perl mason what is the difference between .m file and .mi file?

I would want to understand the difference between a .m file and .mi file in Perl/Mason. As per the mason components docs: .mi - internal component. An internal component can only be accessed from other components. I can see that i can call…
achut1993
  • 21
  • 1
  • 6
1
2
3
9 10