Re: [Mason] passing data to a mason component and disabling autohandler inheritance

2008-12-16 Thread Anthony Ettinger
On Tue, Dec 16, 2008 at 4:31 PM, Jonathan Swartz wrote: > This is probably most helpful: > > http://www.masonhq.com/?FAQ:Components#h-i_m_trying_to_generate_an_image_or_other_binary_file__but_it_seems_to_be_getting_corrupted_ > > On Dec 16, 2008, at 4:23 PM, Anthony Ettinger wrote

[Mason] passing data to a mason component and disabling autohandler inheritance

2008-12-16 Thread Anthony Ettinger
page request? (I don't want to have to duplicate all the code that gets the results hash from the DB in two different places). Thank you, -- Anthony Ettinger 408-656-2473 http://anthony.ettinger.name -- SF.N

[Mason] accessing $r object from within a module

2008-09-15 Thread Anthony Ettinger
e), but I need to pass the session cookies along with the request: <%init> my $api = new My::API; my $results = $api->get('http://provider.com/api/get/this/stuff'); my $data = XMLIn($results, 'ForceArray' => 1);

[Mason] skeleton layout generator?

2008-07-09 Thread Anthony Ettinger
interfaces from scratch every time. -- Anthony Ettinger 408-656-2473 http://anthony.ettinger.name - Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! Studies have shown that voting for your favorite open

[Mason] session data options?

2008-03-19 Thread Anthony Ettinger
I'm currently looking for a standard way of using session data in Mason...what do people use and find works/doesn't work well? I need to store session data for a given user logged in to the app across multiple requests. -- Anthony Ettinger 408-656-2473 http://anthony.ett

[Mason] DRY principle and Edit/Create forms

2008-02-05 Thread Anthony Ettinger
I want to re-use a form partial for both edit and create views on an object...what is the best way to allow the form to be populated if data exists. I currently am doing like this for every input field: <% $message ? $message : '' %> -- Anthony Ettinger 4

Re: [Mason] sharing data between components

2007-12-14 Thread Anthony Ettinger
t; This is no different than > > package HTML::Mason::Commands; > use vars qw($stash); > > $HTML::Mason::Commands::stash = { ... }; > > > > On Dec 14, 2007, at 3:48 PM, Anthony Ettinger wrote: > > > On Dec 14, 2007 1:45 PM, Perrin Harkins <[EMAIL

Re: [Mason] sharing data between components

2007-12-14 Thread Anthony Ettinger
have is its only available to mason parts (not backend perl modules that are loaded). -- Anthony Ettinger 408-656-2473 http://anthony.ettinger.name var (bonita, farley) = new Dog; farley.barks("very loud"); bonita.barks("at strangers");

Re: [Mason] persisting an object to all parts

2007-12-05 Thread Anthony Ettinger
On Dec 5, 2007 3:41 PM, Perrin Harkins <[EMAIL PROTECTED]> wrote: > On Dec 5, 2007 6:33 PM, Anthony Ettinger <[EMAIL PROTECTED]> wrote: > > In effect, I just want this thing to die off at the end of each http > > request, and not shared between other users of the applica

Re: [Mason] persisting an object to all parts

2007-12-05 Thread Anthony Ettinger
> > > On Dec 5, 2007, at 11:30 AM, Anthony Ettinger wrote: > > > I have an object (contains UI messaging interface) that I want to > > persist throughout all the mason parts/includes in a request. > > > > How should I do this? > > > > autohandler?: >

[Mason] persisting an object to all parts

2007-12-05 Thread Anthony Ettinger
->err("There was an error with FOO"); /parts/bar $msg->ok("Bar processed correctly!"); /autohandler: print $msg->errors(); Similar to the global $m (mason object)...I do not want to have to pass $msg object explicitly to all my files. -- Anthony Ettinger 408-656-2473

Re: [Mason] UI messaging in mason?

2007-12-04 Thread Anthony Ettinger
to > doing this and it worked out well. > > Hope that helps, > Bradley C Bailey > > Anthony Ettinger wrote: > > Are there any standard features in mason for messaging in the UI? > > > > ie: errors, successes, and generic messages. > > --

[Mason] accessing %ARGS from within a mason component?

2007-12-04 Thread Anthony Ettinger
I want to get the value for a given argument from within my component, is there a global %ARGS hash? When I try <% $ARGS{'first_name'} %> it is empty. this is assuming http://bar.com/foo.html?first_name=foobar -- Anthony Ettinger 408-656-2473 http://anthony.ettinger.name var

[Mason] UI messaging in mason?

2007-12-03 Thread Anthony Ettinger
Are there any standard features in mason for messaging in the UI? ie: errors, successes, and generic messages. -- Anthony Ettinger 408-656-2473 http://anthony.ettinger.name var (bonita, farley) = new Dog; farley.barks("very loud"); bonita.barks(&qu

Re: [Mason] conditionally changing content-type

2007-09-03 Thread Anthony Ettinger
c css and javascript requests to be cached though. So going from 5 js include tags to one (with caching allowed) reducing the number of http queries. -- Anthony Ettinger Ph: 408-656-2473 var (bonita, farley) = new Dog; farley.bar

Re: [Mason] conditionally changing content-type

2007-08-30 Thread Anthony Ettinger
On 8/30/07, Andrew Chilton <[EMAIL PROTECTED]> wrote: > > On 31/08/2007, Anthony Ettinger <[EMAIL PROTECTED]> wrote: > > > > > > On 8/30/07, Alfie John <[EMAIL PROTECTED]> wrote: > > > > > > However, if your CSS files are purely static,

Re: [Mason] conditionally changing content-type

2007-08-30 Thread Anthony Ettinger
; > > However, if your CSS files are purely static, they shouldn't be > handled by mason in the first place. > > Alfie They are static files, but I only want one request to load all css files. Which is why I am writing a mason component that spits out all css files concatenated.

[Mason] Reading files

2007-08-30 Thread Anthony Ettinger
" It is not known where the root path lies ahead of time. So I need to figure out how to convert "/path/to/file" into ("$root/path/to/file") Where $root could be /Dev1, /Dev2, /Dev3, etc etc. depending on where the sources are kept. -- Anthony Ettinger Ph: 408-656-2473 va

Re: [Mason] conditionally changing content-type

2007-08-30 Thread Anthony Ettinger
_newval___ > > but ss. That's not got anything to do with Mason, so let's > just move swiftly on... $self->works_like("charm"); -- Anthony Ettinger Ph: 408-656-2473 var (bonita, farley) = new Dog; farley.barks("very l

[Mason] conditionally changing content-type

2007-08-30 Thread Anthony Ettinger
text/css"); But that basically removed ALL headers with a 200 response only. (no data was actually returned on the page either). -- Anthony Ettinger Ph: 408-656-2473 var (bonita, farley) = new Dog; farley.barks("very loud"); bonita.barks("at strangers"); http://chovy.dyndn

[Mason] <%filter_after> or <%filter_only> behavior?

2007-06-07 Thread Anthony Ettinger
s that I want to only filter /comp/nav, but the page.htmldoesn't set the variable I need because /comp/nav is included prior to the $m->call_next; invocation in autohandler. I basically only want to filter the /comp/nav only, but after the entire page is parsed by mason. -- Anthony

Re: [Mason] default 404 (error page)?

2007-06-05 Thread Anthony Ettinger
On 6/5/07, Jonathan Swartz <[EMAIL PROTECTED]> wrote: http://httpd.apache.org/docs/2.2/mod/core.html#errordocument You could also use a top-level /dhandler. On Jun 5, 2007, at 2:45 PM, John Romkey wrote: > On Jun 5, 2007, at 5:28 PM, Anthony Ettinger wrote: > >> How do I

[Mason] default 404 (error page)?

2007-06-05 Thread Anthony Ettinger
How do I tell mason to just load error.html if there is a 404? -- Anthony Ettinger Ph: 408-656-2473 var (bonita, farley) = new Dog; farley.barks("very loud"); bonita.barks("at strangers"); http://chovy.dyndns.org/resume.html http://u

[Mason] location href?

2007-06-04 Thread Anthony Ettinger
I want to flag a menu item as active based on the URL. Does anyone know how I access the value of the current url? ie "/page/foo.html" -- Anthony Ettinger Ph: 408-656-2473 http://chovy.dyndns.org/resume.html http://utuxia.com/

[Mason] html escaping changed?

2007-06-01 Thread Anthony Ettinger
<% $json %> where $json = q{var some_valu = 'foo';}; that used to show as is, but in latest mason, more things are being escaped, ie "‹", etc. -- Anthony Ettinger Ph: 408-656-2473 http://chovy.dyndns.org/resume.html ht

Re: [Mason] overwrite an http header

2007-05-29 Thread Anthony Ettinger
Jno > > On May 29, 2007, at 9:42 AM, Anthony Ettinger wrote: > > > Negative ghost rider... > > > > appears to be some security measure where I cannot delete or override, > > only append. > > > > > > > > On 5/25/07, Lionel MARTIN <[E

Re: [Mason] overwrite an http header

2007-05-29 Thread Anthony Ettinger
ake it. > > Needs testing though, > > Lionel. > > > - Original Message - > From: "Anthony Ettinger" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Saturday, May 26, 2007 2:06 AM > Subject: [Mason] overwrite an http header > > > &g

[Mason] overwrite an http header

2007-05-25 Thread Anthony Ettinger
quot;no-cache" value entirely from within my mason component. Please help! Thanks. -- Anthony Ettinger Ph: 408-656-2473 http://chovy.dyndns.org/resume.html http://utuxia.com/consulting - This SF.net email is sponsor