Parent Directory
|
Revision Log
++ ChangeLog 26 Jul 2008 11:26:00 -0000 2008-07-26 Wakaba <wakaba@suika.fam.cx> * cc.cgi: get_input_document function is now handled by WebHACC::Input classes. |cc-script| reference is now generated by |html_header| in WebHACC::Output. * error-description-source.xml: Document URL and Request URL are now just "URLs". ++ html/WebHACC/ChangeLog 26 Jul 2008 11:27:20 -0000 2008-07-26 Wakaba <wakaba@suika.fam.cx> * Input.pod: New. * Input.pm (urls, url, add_url): New. Originally handled as |$input->{uri}| and |$input->{request_uri}|. (get_document and related methods/classes): New. Originally part of |cc.cgi|. * Output.pm (html_header): Link to |cc-script.js|.
| 1 | wakaba | 1.1 | package WebHACC::Input; |
| 2 | use strict; | ||
| 3 | |||
| 4 | sub new ($) { | ||
| 5 | wakaba | 1.6 | return bless {urls => []}, shift; |
| 6 | wakaba | 1.1 | } # new |
| 7 | |||
| 8 | wakaba | 1.3 | sub id_prefix ($) { '' } |
| 9 | |||
| 10 | sub nested ($) { 0 } | ||
| 11 | |||
| 12 | sub subdocument_index ($) { 0 } | ||
| 13 | |||
| 14 | wakaba | 1.4 | sub full_subdocument_index ($) { 0 } |
| 15 | |||
| 16 | wakaba | 1.6 | sub url ($) { |
| 17 | my $self = shift; | ||
| 18 | if (@{$self->{urls}}) { | ||
| 19 | return $self->{urls}->[-1]; | ||
| 20 | } else { |