Hi Stephen,

Just a guess here since i haven't used Dancer with Mason (only TT) but in 
general Dancer passes the current Dancer::Request object to any the templating 
system. (https://metacpan.org/module/Dancer::Request)

I would think you get the servername with:

$request->host 


It seems that 'host' isn't documented in that page the 'host' method will try 
to be smart if you are behind a proxy it should help do the right thing. 

Take Care,

Lee






>________________________________
> From: Stephen Fenwick-Paul <step...@makessense.co.uk>
>To: mason-users@lists.sourceforge.net 
>Sent: Friday, December 9, 2011 6:27 AM
>Subject: [Mason] Mason2 on Dancer - server name
> 
>
>I expect this is a question I should already known the answer to, but I need 
>to ask.
>
>
>How do I get hold of my server's name within the template. In the bad old days 
>one could grab it from %ENV.
>
>
>If I Dumper of $m I can see the server name under vairious structures, but I 
>assume this is a most inelegant way of accessing it.
>
>
>thanks
>
>
>Stephen
>
>
>
>
>------------------------------------------------------------------------------
>Cloud Services Checklist: Pricing and Packaging Optimization
>This white paper is intended to serve as a reference, checklist and point of 
>discussion for anyone considering optimizing the pricing and packaging model 
>of a cloud services business. Read Now!
>http://www.accelacomm.com/jaw/sfnl/114/51491232/
>_______________________________________________
>Mason-users mailing list
>Mason-users@lists.sourceforge.net
>https://lists.sourceforge.net/lists/listinfo/mason-users
>
>
>
------------------------------------------------------------------------------
Learn Windows Azure Live!  Tuesday, Dec 13, 2011
Microsoft is holding a special Learn Windows Azure training event for 
developers. It will provide a great way to learn Windows Azure and what it 
provides. You can attend the event by watching it streamed LIVE online.  
Learn more at http://p.sf.net/sfu/ms-windowsazure
_______________________________________________
Mason-users mailing list
Mason-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mason-users

Reply via email to