NAME

Plack::Handler::Stomp::PathInfoMunger - printf-style interpolations for PATH_INFO

VERSION

version 1.05

FUNCTIONS

munge_path_info

my $str = munge_path_info($format_string,$server_config,$stomp_frame);

Interprets the $format_string in a printf-like way: every %{something} is replaced with a value from the $server_config or the $stomp_frame. In particular:

%{broker.hostname}

is replaced by the value of $server_config->{hostname}

%{broker.port}

is replaced by the value of $server_config->{port}

%{header.something}

is replaced by the value of $stomp_frame->headers->{something} (of course something in this example can be replaced by whatever string you want).

anything else

is replaced by an empty string (i.e. it's removed).

AUTHOR

Gianni Ceccarelli <gianni.ceccarelli@net-a-porter.com>

COPYRIGHT AND LICENSE

This software is copyright (c) 2012 by Net-a-porter.com.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.