Hi David,
David Silva wrote: > I'm new in HTML::Mason, and i'm reading the "Embedding Perin in HTML with > Mason" (october 2002 : First Edition). > > I'm writing to ask how dhandler work, cos i still don't get how to work, or > what to code in the dhandler file. As for "how they work", I personally found the example "Using Autohandlers and Dhandlers together" to be an excellent example. That's at the end of Chapter 3. Of course, the whole chapter is great, but [for me] that section in particular got me clued in... > I'm doing a simple example with mason, where i have a form to login, i > though i could use dhandler to create(or emulate) a directory with the name > of the user that will login, but i'm really stuck and don't even know if > dhandler is for those things. > > If you can help me, giving me some light's would be really nice. I'm not sure what you mean by "emulate" a directory. It's not clear to me how the above could be achieved...maybe this might work: Suppose a user logs in and after entering the password, they are taken to: http://www.example.com/users/johndoe/ . So far, unrelated to dhandlers. But if you created a directory /users but not /users/johndoe, then you could add a dhandler in /users which would do what that Chapter 3 section at the end does. Instead of "newspapers for a requested date", it would be a user name. I guess that would work...but I'm not sure what this achieved since when the user logged in, you knew their login ID. dhandlers are handy when you are given a URL and go up the chain of dhandlers. In your case, the user logged in and you have his/her user ID already; forming a URL just to exploit dhandlers seems like you're taking an extra step... Sorry...maybe I'm missing something there; but hope this helps a bit! Ray ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ Mason-users mailing list Mason-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mason-users