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!" ).
⠤⠤ ⠙⠊⠕⠞⠁⠇⠑⠧⠊
In reply to Re: Mapping URLs to code - in search of perlish dispatch schemes
by diotalevi
in thread Mapping URLs to code - in search of perlish dispatch schemes
by Corion
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |