Skip to content

Instantly share code, notes, and snippets.

@KamilaBorowska
Created December 4, 2012 20:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save KamilaBorowska/4208577 to your computer and use it in GitHub Desktop.
Save KamilaBorowska/4208577 to your computer and use it in GitHub Desktop.
sub { my $_M = ""; use URI::Escape; sub html { $^a.trans: '<>&"' => <&lt; &gt; &amp; &quot;> } ;$_M ~= '
'; my $page = $^a; my $rev = $^c; ;$_M ~= '
';;$_M ~= '<!doctype html>
';;$_M ~= '<meta charset=utf-8>
';;$_M ~= '<title>December - ';;$_M ~= html $^a ;;$_M ~= '</title>
';;$_M ~= '<link rel=stylesheet href=\'http://perlcabal.org/~glitchmr/wiki/style.css\'>
';;$_M ~= '<div class=menu>
';;$_M ~= '
';;$_M ~= '<ul>
';;$_M ~= '<li class=camelia><a href=\'/\'><img src=\'http://perlcabal.org/~glitchmr/wiki/camelia2.png\' alt=\'Main page\'></a>
';;$_M ~= '<li><a href="/';;$_M ~= html uri_escape $^a ;;$_M ~= '/edit">Edit</a>
';;$_M ~= '<li><a href="/';;$_M ~= html uri_escape $^a ;;$_M ~= '/log">Log</a>
';;$_M ~= '<li><a href="/RANDOM">Random page</a>
';;$_M ~= '</ul>
';;$_M ~= '</div>
';;$_M ~= '<h1>';;$_M ~= html $^a ;;$_M ~= '</h1>
';;$_M ~= '<table>
';;$_M ~= '<tr><th>Time<th>Description<th>Action<th>Diff ';;$_M ~= $^d ;;$_M ~= '
'; for @($^b) -> @entry { ;$_M ~= '
';;$_M ~= ' <tr>
';;$_M ~= ' <td><a href="/';;$_M ~= html uri_escape $page ;;$_M ~= '/';;$_M ~= @entry[0] ;;$_M ~= '" title="';;$_M ~= html @entry[3] ;;$_M ~= '">';;$_M ~= html @entry[2] ;;$_M ~= '</a>
';;$_M ~= ' <td>';;$_M ~= html @entry[1] ;;$_M ~= '
';;$_M ~= ' <td><a href="/';;$_M ~= $page ;;$_M ~= '/revert/';;$_M ~= @entry[0] ;;$_M ~= '">Revert</a>
';;$_M ~= ' <td><a href="/';;$_M ~= $page ;;$_M ~= '/log/';;$_M ~= $rev ?? "$rev/" !! "" ;;$_M ~= @entry[0] ;;$_M ~= '">';;$_M ~= @entry[0] ;;$_M ~= '</a>
'; } ;$_M ~= '
';;return $_M;}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment