in reply to Mapping URLs to code - in search of perlish dispatch schemes
Let's you and me get Ovid to release a copy of AI::Prolog which can callback into perl. Interpolation of variables in strings would be nice too.
% Edit! request :- url( 'edit' ), not( node( _ ) ), error( "Edit *which* node?!" ). request :- url( 'edit' ), node( Node ), do_edit_node( Node ), % dispatch perl print( " ... " ). % Create! request :- url( 'create' ), not( code( _ ) ), error( "You didn't give any code!" ). request :- url( 'create' ), not( name( _ ) ), error( "You didn't give a name!" ). request :- url( 'create' ), name( Name ), code( Code ), do_create_node( Name, Code ), % dispatch perl print( "Created $Name { $Code }" ). request :- error( "I can't handle the stress!" ).
⠤⠤ ⠙⠊⠕⠞⠁⠇⠑⠧⠊
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Mapping URLs to code - in search of perlish dispatch schemes
by diotalevi (Canon) on Jul 28, 2006 at 07:01 UTC | |
|
Re^2: Mapping URLs to code - in search of perlish dispatch schemes
by Ovid (Cardinal) on Jul 28, 2006 at 11:23 UTC | |
by diotalevi (Canon) on Jul 28, 2006 at 19:30 UTC |