From: Mike Taylor Date: Tue, 26 Sep 2006 09:31:10 +0000 (+0000) Subject: New X-Git-Tag: CPAN-v1.02~54^2~976 X-Git-Url: http://git.indexdata.com/?p=irspy-moved-to-github.git;a=commitdiff_plain;h=42df1e0ffaa38a2beb1186b5bcd2988a43d444c7;ds=sidebyside New --- diff --git a/lib/ZOOM/IRSpy/Web.pm b/lib/ZOOM/IRSpy/Web.pm new file mode 100644 index 0000000..9ec823c --- /dev/null +++ b/lib/ZOOM/IRSpy/Web.pm @@ -0,0 +1,55 @@ +# $Id: Web.pm,v 1.1 2006-09-26 09:31:10 mike Exp $ + +package ZOOM::IRSpy::Web; + +use 5.008; +use strict; +use warnings; + +use ZOOM::IRSpy; +our @ISA = qw(ZOOM::IRSpy); + +use ZOOM::IRSpy::Record qw(xml_encode); + +=head1 NAME + +ZOOM::IRSpy::Web - subclass of ZOOM::IRSpy for use by Web UI + +=head1 DESCRIPTION + +This behaves exactly the same as the base C class except +that the Clog()> method does not call YAZ log, but outputs +HTML-formatted messages on standard output. + +=cut + +sub log { + my $this = shift(); + my($level, @s) = @_; + + # We should only produce output if $level is turned on + my $message = "[$level] " . join("", @s); + $| = 1; # + print xml_encode($message), "
\n"; +} + + +=head1 SEE ALSO + +ZOOM::IRSpy + +=head1 AUTHOR + +Mike Taylor, Emike@indexdata.comE + +=head1 COPYRIGHT AND LICENSE + +Copyright (C) 2006 by Index Data ApS. + +This library is free software; you can redistribute it and/or modify +it under the same terms as Perl itself, either Perl version 5.8.7 or, +at your option, any later version of Perl 5 you may have available. + +=cut + +1;