[Oiio-dev] Creating a vec2f ParamValue in python?

2020-03-15 Thread Jonathan Swartz
I’m trying to set some ImageSpec.extra_attribs which is a Vec2f in python. I’ve converted my numpy array to a tuple of tuples since ParamValue requires a tuple and have attempted to create a new ParamValue as such: vec2f = oiio.TypeDesc(oiio.BASETYPE.FLOAT, oiio.AGGREGATE.VEC2) param =

[Oiio-dev] Python multi-formats question

2019-11-13 Thread Jonathan Swartz
Hi Larry et al, I’ve just subscribed to the olio-dev list so apologies if this question has been asked and answered before. I’m using python (3.7 and OIIO 2.0.5) and trying to assemble a multichannel ImageBuf which will contain RGB from one EXR source in float16 format and some arbitrary

Re: [Mason] problems setting up mason in CentOS 6

2016-01-06 Thread Jonathan Swartz
That is strange. What happens if you just create the obj directory manually? On Jan 5, 2016, at 9:53 PM, Richard Welty wrote: > On 1/6/16 12:26 AM, Adam Sjøgren wrote: >> Richard writes: >> >>> i am using .mhtml for the components, but the exposed web pages >>> are all

Re: [Mason] Poet Toolbar injection

2015-11-12 Thread Jonathan Swartz
In your app.psgi, there should be a line enable "Debug”; Remove that. On Nov 12, 2015, at 3:34 AM, Carrington, Matthew (Produban) wrote: > > I have had some problems with the development mode toolbar injection > interfering with my javascript.

Re: [Mason] Import

2015-11-11 Thread Jonathan Swartz
No, these variables are only initialized once per class so not possible to vary based on request. On Nov 11, 2015, at 8:00 AM, Carrington, Matthew (Produban) wrote: > Poet provides a useful facility to import a variable into a component ... > > e.g. From

Re: [Mason] Generating output where lines should start with the % character.

2014-12-03 Thread Jonathan Swartz
On Dec 3, 2014, at 6:19 AM, Guido Brugnara g...@leader.it wrote: On 03/12/2014 13:07, Jozef Mojzis wrote: Need generate an output from an Mason component where the lines should start with the '%' character. If \% is acceptable in your case: pre \%there lines start % for my $x

Re: [Mason] how to debug Mason code?

2014-09-13 Thread Jonathan Swartz
What web framework is this - mod_perl? On Sep 11, 2014, at 2:58 AM, -, - fract...@mailbox.hu wrote: Dear Mason-users! I'm a software developer from Hungary. We've got a large code which is a mix of HTML, Perl, and special Mason commands. Our task is to understand, maintain and develop

Re: [Mason] mason 2 extends and .mp files

2014-09-11 Thread Jonathan Swartz
Yeah, I don’t think there’s any way to do this, because the .mp gets an automatically assigned superclass. You just have to use a component consisting entirely of the extends %flag and a %class section. :/ On Aug 29, 2014, at 11:24 AM, James Orr james.o...@gmail.com wrote: I can use a %flags

Re: [Mason] Best way to setup with apache?

2014-08-13 Thread Jonathan Swartz
Any particular reason you need to keep using Apache, as opposed to (say) Starman? Sorry, I don’t normally like to answer questions that way :), it’s just that most people using PSGI/Plack seemed to have migrated away from Apache for the backend process. On Aug 13, 2014, at 11:09 AM, James Orr

Re: [Mason] path_info not populated

2014-08-11 Thread Jonathan Swartz
It’s supposed to be turned on automatically for chandlers though. Will take a look when I get a moment. On Aug 11, 2014, at 1:40 PM, William Cox mydimens...@gmail.com wrote: Populating path_info is disabled by default. See https://metacpan.org/pod/Mason::Component#allow_path_info to turn it

Re: [Mason] path_info not populated

2014-08-11 Thread Jonathan Swartz
James: This is working fine for me with a simple script and the same file structure as you described. Can you post your script? On Aug 11, 2014, at 1:40 PM, William Cox mydimens...@gmail.com wrote: Populating path_info is disabled by default. See

Re: [Mason] access the psgi environment..

2014-03-05 Thread Jonathan Swartz
$m-req gets you the Plack::Request object. $m-req-env to get the PSGI env. On Mar 5, 2014, at 7:27 AM, A Kobame kobam...@gmail.com wrote: This is the only way access the PSGI $env? $m-{orig_request_params}-{req}-{env} or I'm only blind and need more RTFM to learn a nicer method, like

Re: [Mason] empty % % = different errors...

2014-03-01 Thread Jonathan Swartz
That's a funny one! Fixed in the next release. (Empty tags will be forbidden w/consistent error message.) Thanks Jon On Feb 28, 2014, at 11:34 AM, A Kobame kobam...@gmail.com wrote: Hi all, Searched a half hour the error in the next (now shortened) component. %init $.title =

Re: [Mason] Strange behavior of an attribute

2014-02-26 Thread Jonathan Swartz
So far I've determined that it has to do with Poet's special handling of ArrayRef[Int]. If you remove that isa, it works. On Feb 26, 2014, at 1:56 PM, A Kobame kobam...@gmail.com wrote: app=testapp rm -rf ./$app poet new $app || exit 1 rm $app/comps/Base.mc cat 'EOF' $app/comps/ftest.mc

Re: [Mason] Strange behavior of an attribute

2014-02-26 Thread Jonathan Swartz
. On Wed, Feb 26, 2014 at 11:38 PM, Jonathan Swartz swa...@pobox.com wrote: So far I've determined that it has to do with Poet's special handling of ArrayRef[Int]. If you remove that isa, it works. On Feb 26, 2014, at 1:56 PM, A Kobame kobam...@gmail.com wrote: app=testapp rm -rf ./$app poet

Re: [Mason] Poet::Cache not working for Mason components

2014-01-16 Thread Jonathan Swartz
In Poet::Mason it sets the default cache_root_class to Poet's Cache class: method get_options ($class:) { my %defaults = ( cache_root_class = $poet-app_class('Cache'), There is a Poet test for this in Poet::t::PSGIHandler (test_cache). Is this test passing for you? Jon On Jan 13,

Re: [Mason] Problems installing HTML::Mason

2013-10-13 Thread Jonathan Swartz
That's really strange. You might try using cpanm (https://metacpan.org/module/App::cpanminus). I'd recommend that anyway. On Oct 13, 2013, at 12:46 PM, Ronny Trommer r.trom...@open-factory.org wrote: Hello list, I have a strange issue installing Mason with CPAN in my Ubuntu 10.04 LTS with

[Mason] removing all Mason mailing lists except mason-users

2013-09-29 Thread Jonathan Swartz
There are a number of old Mason mailing lists that have been unused or barely used for a while (except by spammers. :) I'm deleting all except mason-users. Best Jon -- October Webinars: Code for Performance Free Intel

Re: [Mason] dhandler calls function defined in another dhandler, why?

2013-04-16 Thread Jonathan Swartz
All HTML::Mason components are defined in the same package, so you should not use named subroutines. Use anonymous subroutines instead. On Apr 16, 2013, at 6:27 AM, Pavel Cina pavel.cina.exter...@ts.fujitsu.com wrote: Hi, I have two dhalndlers: /api/resources/devices/bs2/tapes/dhandler

Re: [Mason] Mason Wiki

2013-04-03 Thread Jonathan Swartz
Sounds good. The old wiki was overrun by spam and impossible to maintain. Presumably they have a better system at wikibooks. On Apr 3, 2013, at 12:47 PM, Jerker Montelius jerker.montel...@gmail.com wrote: While surfing the web I actually found a good Perl wiki site.

Re: [Mason] Trouble capturing the values of multi-select form elements

2013-03-25 Thread Jonathan Swartz
Are you using Poet? If so this might help: https://metacpan.org/module/Poet::Manual::Intro#Multiple-values-for-parameters On Mar 25, 2013, at 8:04 AM, Wil Peters wil.pet...@xs4all.nl wrote: Hi, I'm new to mason2. In html::mason it was fairly easy to capture the values of a

Re: [Mason] Component from a string?

2013-01-08 Thread Jonathan Swartz
I haven't thought about how to do on-the-fly component compilation in Mason 2 yet. It made the code a lot cleaner not to have to plan for it, and I wasn't sure if anyone would need it. :) It should be possible since Class::MOP and Moose have utilities for creating classes on the fly. Let me

Re: [Mason] index files do not work on 2.20 if allow_path_info is not set

2013-01-07 Thread Jonathan Swartz
, 2013 at 7:13 AM, Jonathan Swartz swa...@pobox.com wrote: On Jan 6, 2013, at 1:03 PM, Oliver Paukstadt pst...@sourcentral.org wrote: There is a test for this case as far as I understand line 104 in Mason-2.20/lib/Mason/t/ResolveURI.pm correct. But this one is designed wrong in my eyes

Re: [Mason] index files do not work on 2.20 if allow_path_info is not set

2013-01-06 Thread Jonathan Swartz
On Jan 6, 2013, at 1:03 PM, Oliver Paukstadt pst...@sourcentral.org wrote: There is a test for this case as far as I understand line 104 in Mason-2.20/lib/Mason/t/ResolveURI.pm correct. But this one is designed wrong in my eyes. It fits the implementation, not what was reality before the

Re: [Mason] index files do not work on 2.20 if allow_path_info is not set

2013-01-04 Thread Jonathan Swartz
Oliver - I think you're right, this was a mistake. It was the result of https://github.com/jonswar/perl-mason/issues/8 I'm not sure what the right behavior should be. For the sake of good SEO, you generally want canonical urls and it's suboptimal to allow /foo/bar and /foo/bar/ to map to

Re: Anyone want Test::Class::Moose?

2012-12-12 Thread Jonathan Swartz
+1 from me! I like Test::Class and would welcome a Moose-ish variety. On Dec 12, 2012, at 9:51 AM, Ovid publiustemp-perl...@yahoo.com wrote: Hi all, People keep asking me how to properly integrate Moose with Test::Class. I know about Test::Able and some alternatives, but I *generally* like

Re: [Mason] Using MooseX::Method::Signatures without warning

2012-12-11 Thread Jonathan Swartz
On Tue, Dec 11, 2012 at 8:51 AM, Allan Engelhardt all...@cybaea.com wrote: If I have a Mason component with %class use MooseX::Method::Signatures; ... /%class then I get an unimportant but annoying warning about Prototype mismatch: sub MC0::(some component)::method () vs none

Re: [Mason] Documentation for Defer?

2012-11-15 Thread Jonathan Swartz
It is in its own plugin which is enabled by default: Mason::Plugin::Defer. That was the cleanest implementation but it's definitely not optimal for documentation, I need to mention it in a few more places. On Nov 13, 2012, at 11:17 PM, Allan Engelhardt wrote: Is the Defer (filter) method

Re: preforking prove

2012-11-08 Thread Jonathan Swartz
On 11/07/2012 03:51 PM, Jonathan Swartz wrote: Now on cpan. A much simpler solution than what I suggested :) and apparently still works with parallel testing. Thanks miyagawa! https://metacpan.org/module/forkprove I did some benchmarking last night and found no real benefit over prove

Re: preforking prove

2012-11-08 Thread Jonathan Swartz
On Nov 8, 2012, at 7:17 AM, Mark Stosberg m...@summersault.com wrote: I wasn't able to get forkprove to work with Test::Class, because of Test::Class's insistence that tests be declared at compile time. swartz cat t/Sanity.t #!/usr/bin/perl use CHI::t::Sanity;

Re: preforking prove

2012-11-07 Thread Jonathan Swartz
Now on cpan. A much simpler solution than what I suggested :) and apparently still works with parallel testing. Thanks miyagawa! https://metacpan.org/module/forkprove On Nov 6, 2012, at 9:58 AM, Jonathan Swartz wrote: miyagawa sent me this proof of concept - using fork, not starman

Re: preforking prove

2012-11-06 Thread Jonathan Swartz
On Nov 6, 2012, at 12:08 AM, Eric Wilhelm wrote: Hi Jonathan, I like the idea. I rambled along similar lines a few years ago but don't think I got past some preliminary code and $work has not had any pressing need for such a thing in the meantime. * works well with parallel prove

Re: preforking prove

2012-11-06 Thread Jonathan Swartz
:) than your preforking solution. Cheers, Ovid -- Twitter - http://twitter.com/OvidPerl/ Buy my book - http://bit.ly/beginning_perl Buy my other book - http://www.oreilly.com/catalog/perlhks/ Live and work overseas - http://www.overseas-exile.com/ From: Jonathan Swartz swa...@pobox.com

Re: [Mason] Inverse of Mason::Interp-write_object_file ?

2012-11-05 Thread Jonathan Swartz
_load_class_from_object_file? On Nov 2, 2012, at 3:42 AM, Allan Engelhardt wrote: What is the inverse of Mason::Interp-write_object_file() ? Within Poet, I am changing this function to (potentially) modify the $object_file argument (to handle Unicode [1]) which works a charm, but I wanted

preforking prove

2012-11-05 Thread Jonathan Swartz
We have a large slow test suite at work (Test::Class, 225 classes, about 45 minutes run time). Many of the tests start by loading a bunch of the same modules. Obviously we could speed things up if we could share that loading cost. I'm aware of Test::Aggregate and Test::Aggregate::Nested, but a

Re: [Mason] Removing default sidebar

2012-11-01 Thread Jonathan Swartz
:) That's Plack::Middleware::Debug. You can remove it by commenting out the appropriate line in bin/app.psgi. # Add Plack middleware here # if ( $conf-is_development ) { enable Plack::Middleware::StackTrace; enable Plack::Middleware::Debug; === } On Nov 1,

Re: [Mason] Passing complex GET parameters to Mason2

2012-10-24 Thread Jonathan Swartz
$.args ($self-args) will return a hashref of arguments passed to a component. It's like %ARGS, except that it's a method call rather than a magic scalar. On Oct 24, 2012, at 5:18 AM, Kamil Niechajewicz wrote: Hello, We ran into a problem recently – we have quite complex form that is used to

Re: [Mason] Mason 2 and Dancer error.

2012-10-08 Thread Jonathan Swartz
Don't know. So I assume it works with simple template, but not with Mason? The stack trace isn't helpful, unfortunately, as it doesn't mention who is calling Memoize::flush_cache. On Oct 4, 2012, at 5:36 AM, Renato Tegon Forti wrote: Hi All, I am trying run Mason2 on Dancer, but I get

Re: [Mason] Different url's same actions...

2012-10-08 Thread Jonathan Swartz
On Sep 28, 2012, at 11:42 AM, T.Lawrance wrote: There are other examples of how to do internationalization on the Mason book and Mason HQ sites. Yes, for HTML::Mason, like the suggested %shared blocks. Thank you anyway for suggestions, I'll thinking about how to implement it in

Re: [Mason] Mason Tidy!

2012-10-03 Thread Jonathan Swartz
I can't repro that one - are you using any particular options? On Oct 3, 2012, at 4:15 AM, Pedro Melo wrote: Hi, On Tue, Oct 2, 2012 at 7:53 AM, Jonathan Swartz swa...@pobox.com wrote: These should be fixed in 2.56, coming to CPAN shortly. Let me know. Yes, they are all solved, but I

Re: [Mason] Configure Mason2 + Poet on Apache2. How to?

2012-10-03 Thread Jonathan Swartz
Mason 2 will work with Apache/mod_perl 1. On Oct 3, 2012, at 1:43 PM, Renato Tegon Forti wrote: Hi I have one project that use Mason 1, this run in mod_perl on apache and use SSL (only port 443). Now I want rewrite it to use Mason2! But I need run it on SSL, and then I think that I need

Re: [Mason] Mason Tidy!

2012-10-02 Thread Jonathan Swartz
These should be fixed in 2.56, coming to CPAN shortly. Let me know. Speaking of white-space: empty % lines gain an extra space (also visible in git-gui as a big read block :) ). More: if a file ends with a empty % line, the entire line is removed… Fixing…

Re: [Mason] new Mason/Poet site

2012-10-01 Thread Jonathan Swartz
. Thanks Jon On May 24, 2012, at 1:36 PM, Jonathan Swartz wrote: I want to create a new Mason/Poet site to replace the current masonhq.com. I see it along the lines of sites like Moose (http://moose.iinteractive.com/) PSGI/Plack (http://plackperl.org/) Dancer (http://perldancer.org

Re: [Mason] Mason Tidy!

2012-10-01 Thread Jonathan Swartz
On Oct 1, 2012, at 5:05 AM, Pedro Melo wrote: Hi, On Fri, Sep 28, 2012 at 6:47 PM, Jonathan Swartz swa...@pobox.com wrote: Yes, this was certainly a bug... I tried to preserve both cases (newline and no-newline at end of file), but it turns out that perltidy always enforces a newline

Re: [Mason] Mason Tidy!

2012-09-28 Thread Jonathan Swartz
[forwarding to list] Yes, this was certainly a bug... I tried to preserve both cases (newline and no-newline at end of file), but it turns out that perltidy always enforces a newline at end, so I'm just going to do the same. Hope no one feels strongly about not having a newline at end. Thanks

Re: [Mason] Different url's same actions...

2012-09-26 Thread Jonathan Swartz
This ought to be easy to do, as it's a common need. You can certainly do this in /eshop/warenkorb/versand: % $m-go('/echop/cart/shipping'); but that's tedious, there ought to be a way to create a single configuration table and handle this all at a higher level just before control enters

Re: [Mason] Mason tidy

2012-09-23 Thread Jonathan Swartz
I ran into was some weirdness I had in an autohandler. I had lines like this: %method methodName\ %args $foo /%args\ HTML\ /%method It didn't like the escaped newline. But I have no idea what that was there in the first place. On Fri, Sep 21, 2012 at 4:49 AM, Jonathan Swartz

Re: [Mason] Mason tidy

2012-09-21 Thread Jonathan Swartz
I've released masontidy 2.53 which tidies %perl blocks and %-lines together. It should also handle the case below with intervening methods, btw. Give it a try and let me know how it does on your code base. Jon I think basically all the perl sections should combine with all the inline

Re: [Mason] mmm-mason.el for mason2

2012-09-21 Thread Jonathan Swartz
On Sep 13, 2012, at 7:40 AM, Vegard Vesterheim wrote: On Thu, 13 Sep 2012 10:08:51 -0400 Jonathan Swartz swa...@pobox.com wrote: I never got MMM mode to work reliably even for Mason 1. :) But it would be awesome if it did work. Anyone using it? Well, I am ;-). The most useful part

Re: [Mason] Mason tidy

2012-09-13 Thread Jonathan Swartz
On Sep 13, 2012, at 9:49 AM, Pedro Melo wrote: On Thu, Sep 13, 2012 at 4:02 AM, Jonathan Swartz swa...@pobox.com wrote: masontidy tidies the Perl code embedded in Mason components. It works with See below for an example. Please give it a try (make sure you have backup!) and let me know

Re: [Mason] mmm-mason.el for mason2

2012-09-13 Thread Jonathan Swartz
I never got MMM mode to work reliably even for Mason 1. :) But it would be awesome if it did work. Anyone using it? On Sep 13, 2012, at 9:40 AM, Vegard Vesterheim wrote: Has anyone attempted to port mmm-mason.el to Mason2? http://www.masonhq.com/?odeForEmacs - Vegard V -

Re: [Mason] Mason tidy

2012-09-13 Thread Jonathan Swartz
On Sep 13, 2012, at 9:49 AM, Pedro Melo wrote: On Thu, Sep 13, 2012 at 4:02 AM, Jonathan Swartz swa...@pobox.com wrote: masontidy tidies the Perl code embedded in Mason components. It works with See below for an example. Please give it a try (make sure you have backup!) and let me know

[Mason] Mason tidy

2012-09-12 Thread Jonathan Swartz
File under ought to have been written ten years ago, but oh well: https://metacpan.org/module/masontidy masontidy tidies the Perl code embedded in Mason components. It works with %-lines, % % tags, and the various Perl blocks, in both Mason 1 and Mason 2 syntax. It does not (yet) attempt

Re: [Mason] Mason2: Filter (component with content) syntax

2012-07-12 Thread Jonathan Swartz
Hi Roman, There are two separate issues here: (1) where are filters defined, and (2) how are they applied. 1. In Mason 2 filters are defined by methods, rather than by components. This makes sense for a large variety of filters that don't output content of their own but simply process their

Re: [Mason] Running multiple Mason scripts

2012-07-11 Thread Jonathan Swartz
Hi Marc - just working through email backlog and noticed that this went unanswered. First of all, as you may have noticed, all the psgi/plack Mason support has moved to Poet, so I'd suggest you look there if you are still pursuing this. If you have several different sites, I think it is

Re: [Mason] static analysis tool for Mason

2012-07-04 Thread Jonathan Swartz
Can you be more specific? What in particular are you looking to analyze? On Jul 3, 2012, at 6:24 PM, Sridhar, Meera wrote: Hi, Is there a static analysis tool (or something similar) for Mason. Thanks! --

Re: [Mason] Components distribution format template switcher

2012-07-03 Thread Jonathan Swartz
On Jul 2, 2012, at 5:17 AM, A Kobame wrote: Hi folks, I'm wondering that here is any preferred/recommentd component distribution method? Display components tend to be site and application specific; I've never figured out a way to package them generically. I think the best thing to do

Re: [Mason] Official HTML::Mason (Mason1) repository?

2012-06-29 Thread Jonathan Swartz
https://github.com/jonswar/perl-html-mason is going to be the official one going forward. It was cloned from Dave's git server but hasn't been used for a release yet. On Jun 29, 2012, at 3:56 AM, Pedro Melo wrote: Hi, which git repository is the canonical for HTML::Mason? Thanks, --

Re: [Mason] Mastering an app.psgi for multiple PSGI applications - poet's tree and config

2012-06-12 Thread Jonathan Swartz
On Jun 12, 2012, at 7:07 AM, Pedro Melo wrote: Hi, On Tue, Jun 12, 2012 at 12:50 PM, A Kobame kobam...@gmail.com wrote: I want run more different applications under STARMAN, so my app.psgi will looks like: [...] the question is: how to correctly configure the two poet apps, when

Re: [Mason] PHP makes bad things happen?

2012-05-29 Thread Jonathan Swartz
changed. Testing your theory: PHP 5.2.14 installed, working with a disabled Mason. reenabled mason and php files still render, but mason directed files throw the 502 error. On Tue, May 29, 2012 at 11:59 AM, Jonathan Swartz swa...@pobox.com wrote: 9) Was told by the ISP techie

[Mason] new Mason/Poet site - help wanted

2012-05-24 Thread Jonathan Swartz
I want to create a new Mason/Poet site to replace the current masonhq.com. I see it along the lines of sites like Moose (http://moose.iinteractive.com/) PSGI/Plack (http://plackperl.org/) Dancer (http://perldancer.org/) i.e., much less ambitious and self-contained, mostly some nice

Re: [Mason] just wondering: why is Poet called Poet?

2012-05-21 Thread Jonathan Swartz
Named after my favorite robot in Infocom's Suspended (http://en.wikipedia.org/wiki/Suspended). -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has

Re: [Mason] Mason advantages

2012-05-15 Thread Jonathan Swartz
Hi Marc, As the author I'm obviously biased, but I'll give you my take on the three key differences between Poet+Mason and analagous combos, e.g. Catalyst+TT, Dancer+TT, and Mojolicious. 1) Builds upon the best of CPAN Poet+Mason depends proudly on Moose and Plack/PSGI (as well as a few other

Re: [Mason] Mason2: no default HTML escaping

2012-05-10 Thread Jonathan Swartz
On Wed, 9 May 2012, Paul Wallingford wrote: The problem is context. Escaping is appropriate in certain contexts and not in others. There are many ways to determine context, quite a few of them slow. The speed issues of Mason2, due largely to Moose as discussed in the past, means you do

Re: [Mason] Mason2: no default HTML escaping

2012-05-09 Thread Jonathan Swartz
As you noted, escaping by default would be fine and largely a non-argument if Mason were explicitly a Web template language, but it's not. I'm confused Stephen, because this statement seems to contradict your other statement that escaping by default never works right, because too many

Re: [Mason] Mason2: no default HTML escaping

2012-05-09 Thread Jonathan Swartz
I think the default for text outside a %perl block should be HTML style escaping, since it seems that most Mason2 apps are web apps and most non-web Mason2 apps would need some sort of Perl to generate their output (and there is always the here-doc for boilerplate text). Have to disagree,

Re: [Mason] Trouble Installing Poet

2012-05-06 Thread Jonathan Swartz
The latest Moose (2.06) broke Mason pre-2.19 in a big way; I was importing MooseX::HasDefaults::RO in an incorrect way that just happened to work before. Hence, lots of errors about attibutes. Please upgrade to the latest Mason and try again. Let me know if this does not work with the latest

Re: [Mason] Odd session behaviour - plackup vs starman

2012-05-03 Thread Jonathan Swartz
Thanks. On Wed, May 2, 2012 at 11:44 AM, Jonathan Swartz swa...@pobox.com wrote: How is the session middleware configured? On May 2, 2012, at 10:58 AM, Dane Buson wrote: I'm having trouble where things I store in session work in Plackup, but not Starman. I'm getting an undefined

Re: [Mason] Mason2: no default HTML escaping

2012-05-03 Thread Jonathan Swartz
On Mar 7, 2012, at 1:49 AM, Pedro Melo wrote: On Wed, Mar 7, 2012 at 12:11 AM, Jonathan Swartz swa...@pobox.com wrote: I hear your concerns. So I'm not sure which of these you are suggesting: 1) Substitution tags should be HTML-escaped by default in Mason. This one would be my choice

Re: RFC: a universal tidier

2012-04-30 Thread Jonathan Swartz
Yeah, Any::Tidy seemed to suggest to me use the best of available tidiers. I'm leaning now towards Devel::TidyAll, with tidyall being the name of the script. On Apr 30, 2012, at 11:17 AM, David Nicol wrote: On Sun, Apr 29, 2012 at 7:56 AM, Jonathan Swartz swa...@pobox.com wrote: Comments

RFC: a universal tidier

2012-04-29 Thread Jonathan Swartz
I'm thinking about a module/script to unify a bunch of code tidiers and validators in a single place. With a single command, e.g. % tidyall you could apply the appropriate tidiers and validators to files in your project (e.g. your git directory hierarchy). It would tidy each file as needed

Re: [Mason] Mason Critic

2012-04-26 Thread Jonathan Swartz
I wasn't aware that had been written. :) On Apr 23, 2012, at 2:22 AM, Vyshak K wrote: Hi, I am facing problem in getting HTML::Mason::Critic module. Can you tell me where i can get this module. Thanks, Vyshak K -- DISCLAIMER: This e-mail message may contain confidential,

Re: [Mason] I need help !!!!!!!

2012-04-24 Thread Jonathan Swartz
What error? On Apr 24, 2012, at 8:54 AM, Eugenio Duran Aroche wrote: I have problem whith methods in Mason, I have 2 component (comp1.mas and comp2.mas), and the methods is on comp1.mas and call it from comp2.mas, and return error. comp1.mas %method metodo % print hello world;

Re: [Mason] I need help !!!!!!!

2012-04-24 Thread Jonathan Swartz
You must have an error log somewhere with a more specific error than that. On Apr 24, 2012, at 9:29 AM, Eugenio Duran Aroche wrote: The erro is An internal error related to a template has occurred De: Jonathan Swartz swa...@pobox.com Para: Eugenio Duran Aroche edu...@estudiantes.uci.cu

[Mason] Poet: a web framework for Mason

2012-04-21 Thread Jonathan Swartz
I'm pleased to announce Poet, a modern Perl web framework designed especially for Mason developers: http://search.cpan.org/perldoc?Poet Features include: * A common-sense directory hierarchy for web development * A configuration system that scales elegantly with multiple coders and

Re: [Mason] M2: protect embedded javascript against DollarDot Plugin

2012-04-05 Thread Jonathan Swartz
Oliver - in answer to your original question, I don't have any good ideas about the best way to escape $. in code, but I'm open to ideas you have and would be willing to put some kind of escaping syntax in, as long as it didn't break something else in the process :) On Apr 1, 2012, at 7:49 AM,

Re: [Mason] Mason2: no default HTML escaping

2012-03-07 Thread Jonathan Swartz
On Mar 6, 2012, at 5:18 PM, Paul Wallingford wrote: On 3/6/2012 4:11 PM, Jonathan Swartz wrote: I hear your concerns. So I'm not sure which of these you are suggesting: 1) Substitution tags should be HTML-escaped by default in Mason. 2) DefaultFilter should be implemented and documented

Re: [Mason] Mason2: no default HTML escaping

2012-03-07 Thread Jonathan Swartz
On Mar 7, 2012, at 1:59 AM, Jérôme Étévé wrote: On 7 March 2012 09:49, Pedro Melo m...@simplicidade.org wrote: #1 is hard to do because Mason is supposed to be content-type agnostic - usable for HTML generation but also other kinds of content generation. The default filter is defined in

Re: [Mason] Mason2: no default HTML escaping

2012-03-06 Thread Jonathan Swartz
I hear your concerns. So I'm not sure which of these you are suggesting: 1) Substitution tags should be HTML-escaped by default in Mason. 2) DefaultFilter should be implemented and documented in core Mason, so that it doesn't require a separate plugin install. #1 is hard to do because Mason is

Re: [Mason] Can Mason be used without a server?

2012-02-22 Thread Jonathan Swartz
Well, you need a server of some kind to create a web interface, but there are *very* simple servers nowadays, e.g. servers that fit inside a single Perl process. Have you tried getting this to work on your local machine: http://search.cpan.org/perldoc?Mason::Manual::Tutorial Jon On Feb 22,

Re: [Mason] www.masonhq.com back to work?

2012-02-13 Thread Jonathan Swartz
Am 11.02.2012 um 13:04 schrieb Jonathan Swartz: Nowadays, the action has moved on to other places, like the Catalyst list. People still use Mason 1 and/or 2, but it's a much smaller part of their development stack. This, BTW, describes me. I use Mason 1 solely for templating on new

Re: [Mason] www.masonhq.com back to work?

2012-02-11 Thread Jonathan Swartz
I've little interest in trying to make Mason 2 lightweight enough for standard CGI. Honestly given the ready availability of mod_perl, FastCGI, and Starman, I don't understand why standard CGI is even considered a viable option anymore (but I'm sure diehard CGI fans will yell at me for

Re: [Mason] www.masonhq.com back to work?

2012-02-11 Thread Jonathan Swartz
On Feb 10, 2012, at 7:57 PM, Dave Rolsky wrote: On Thu, 9 Feb 2012, Paul Wallingford wrote: 1) Different configurations for the web server side. How do I make this work with: - Apache / mod_perl (for production) - Apache /Fast CGI (for production) - Standard CGI (for development or

Re: [Mason] www.masonhq.com back to work?

2012-02-11 Thread Jonathan Swartz
On Feb 10, 2012, at 9:29 PM, Bill Walz wrote: Hi all. Mason 1 has paid my bills for over 7 years plus. It is amazing. I get what he is saying. But all Linux distributions now support it. gone are are the days of libapreq2 pain. I guess what I am trying to say is that I have many many

Re: [Mason] www.masonhq.com back to work?

2012-02-11 Thread Jonathan Swartz
I do understand that much of this delay with Moose is startup and that by pulling various tricks, like FastCGI or mod_perl, performance can be improved past the first invocation. I have not run a comparison test using mod_perl or FastCGI yet. Yes, much of the delay is startup - I'd be

Re: [Mason] www.masonhq.com back to work?

2012-02-09 Thread Jonathan Swartz
Christian: How do you mean fully work? You mean with the ability to edit things? I'm not sure how much of a site Mason needs going forward, maybe something like http://moose.iinteractive.com/ with a few pages, and otherwise relying on external web services like

Re: [Mason] Mason2: How to modify object file content (translated template)?

2012-01-23 Thread Jonathan Swartz
Hi Roman, The place to override this is Mason::Compilation: https://metacpan.org/module/Mason::Compilation output_class_header() is probably what you want to override in this case. Give it a try and let me know of problems. Jon On Jan 23, 2012, at 3:01 AM, Roman Daniel wrote: What is

Re: [Mason] Mason2 on Dancer - server name

2011-12-11 Thread Jonathan Swartz
Mason 2 doesn't have anything itself to access the web environment. Is there any way to call Dancer's functions from a Mason template? On Dec 9, 2011, at 4:27 AM, Stephen Fenwick-Paul wrote: I expect this is a question I should already known the answer to, but I need to ask. How do I get

Bug#649066: renamed mason to mason.pl

2011-11-27 Thread Jonathan Swartz
Renamed mason to mason.pl in Mason-2.15. Hope this suffices. Jon -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org

Bug#649066: renamed mason to mason.pl

2011-11-27 Thread Jonathan Swartz
Renamed mason to mason.pl in Mason-2.15. Hope this suffices. Jon -- To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org

Re: [Mason] propagating a redirect from a subexec

2011-10-25 Thread Jonathan Swartz
Try aborting with 302 instead of just returning. On Oct 21, 2011, at 1:19 AM, Louis-David Mitterrand wrote: On Thu, Jul 07, 2011 at 09:24:49AM -0700, Jonathan Swartz wrote: Have you checked the return value of $m-subexec? Yes, if subexec return value is 302 I just return that value from

Re: [Mason] Cache::Memcached

2011-10-17 Thread Jonathan Swartz
Unfortunately I don't think Mason's conf parser is smart enough to know that's an arrayref. You might need to bite the bullet and write a small handler.pl, or initialize Mason caching somewhere in your app. On Oct 17, 2011, at 11:25 AM, Philip Cooper wrote: I'm attempting to switch from

Re: [Catalyst] Re: Recommended caching back-ends

2011-10-07 Thread Jonathan Swartz
On Oct 7, 2011, at 12:22 AM, Stephen Clouse wrote: On Fri, Oct 7, 2011 at 12:05 AM, Toby Corkindale t...@dryft.net wrote: Is there a Plugin::CHI or a CHI driver for Plugin::Cache anywhere? CHI works fine with C::P::Cache out of the box, nothing extra required. Just specify class = 'CHI'

Re: [Mason] Mason2 Help

2011-09-14 Thread Jonathan Swartz
I've reproduced this on my server. The right content is being returned, but with a httpd/unix-directory content type. swartz GET -eSs http://localhost:2400 GET http://localhost:2400 -- 200 OK Connection: close Date: Wed, 14 Sep 2011 18:10:50 GMT Server: Apache/2.2.3 (Unix)

Re: [Mason] default_escape_flags in Mason2

2011-08-25 Thread Jonathan Swartz
Nice, I didn't even know that existed. Thanks Stephen! :) On Aug 25, 2011, at 8:35 AM, Stephen Clouse wrote: On Thu, Aug 25, 2011 at 8:56 AM, Mark Grimes mgri...@cpan.org wrote: Is there currently an equivalent to default_escape_flags? Is it possible to implement along with the n flag

monitoring individual httpd processes for high memory/cpu

2011-08-23 Thread Jonathan Swartz
I'm not sure if this is an appropriate use case for monit. We use Apache/mod_perl 2 and occasionally get a child httpd process that spins out of control, either consuming ever-increasing amounts of memory or max cpu. Usually due to an infinite loop or other bug in a specific part of the site -

Efficiently monitoring httpd children and signalling those using too much memory/cpu

2011-08-22 Thread Jonathan Swartz
We use Apache/mod_perl 2 and occasionally get a child httpd process that spins out of control, either consuming ever-increasing amounts of memory or max cpu. Usually due to an infinite loop or other bug in a specific part of the site - this sort of thing happens. I would like to monitor for

Re: [Mason] Mason 2.13 and Windows Seven

2011-08-17 Thread Jonathan Swartz
What does foo.pl contain? Please make it as minimal as possible. Also do the Mason unit tests pass/fail? On Aug 17, 2011, at 2:38 PM, Jean-Michel Caricand wrote: Hello, I have the same errors with your minimal example hello : c:\mason2perl foo.pl Unrecognized escape \J passed through at

Re: [Mason] Mason 2.13 and Windows Seven

2011-08-17 Thread Jonathan Swartz
Thanks Stephen. To be clear is there something Mason should be doing about this, or is it on Jean-Michel's end? On Aug 17, 2011, at 3:12 PM, Stephen Clouse wrote: On Wed, Aug 17, 2011 at 4:50 PM, Jonathan Swartz swa...@pobox.com wrote: What does foo.pl contain? Please make it as minimal

Re: [Mason] Dancer/Mason2/Apache Not memoized error

2011-08-01 Thread Jonathan Swartz
under apache it appears towant 'data' to be in /usr/sbin - where, on Ubuntu, apache2 resides. So setting data_dir to something sensible fixes my problem. On Mon, Jul 25, 2011 at 11:39 PM, Jonathan Swartz swa...@pobox.com wrote: It worked for me. I'm able to see the Running

  1   2   3   4   >