[Catalyst] Base URI breakdown

Trevor Phillips trevor.phillips at gmail.com
Sat Mar 7 03:02:01 GMT 2009


In a Catalyst app, I need to break down the base request URL to
extract hostname, port, etc separately.

I could do this with a regexp on $c->request->base, or I could use the
URI perl lib, but is there already a way to access this within
Catalyst?

The docs say that $c->request->base is a string only, whereas I'd like
to access separately bits like $c->request->base->host and
$c->request->base->port.

-- 
Trevor Phillips  - http://dortamur.livejournal.com/
"On nights such as this, evil deeds are done. And good deeds, of
course. But mostly evil, on the whole."
      -- (Terry Pratchett, Wyrd Sisters)



More information about the Catalyst mailing list