projects
/
irspy-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added Search/Main.pm and addressing it in Main.pm.
[irspy-moved-to-github.git]
/
lib
/
ZOOM
/
IRSpy
/
Record.pm
diff --git
a/lib/ZOOM/IRSpy/Record.pm
b/lib/ZOOM/IRSpy/Record.pm
index
081e19d
..
1ab5033
100644
(file)
--- a/
lib/ZOOM/IRSpy/Record.pm
+++ b/
lib/ZOOM/IRSpy/Record.pm
@@
-1,4
+1,4
@@
-# $Id: Record.pm,v 1.11 2006-09-25 12:39:34 mike Exp $
+# $Id: Record.pm,v 1.13 2006-09-26 09:08:09 mike Exp $
package ZOOM::IRSpy::Record;
package ZOOM::IRSpy::Record;
@@
-6,6
+6,9
@@
use 5.008;
use strict;
use warnings;
use strict;
use warnings;
+use Exporter 'import';
+our @EXPORT_OK = qw(xml_encode);
+
use XML::LibXML;
use XML::LibXML::XPathContext;
use XML::LibXML;
use XML::LibXML::XPathContext;
@@
-26,7
+29,7
@@
I<## To follow>
sub new {
my $class = shift();
sub new {
my $class = shift();
- my($target, $zeerex) = @_;
+ my($irspy, $target, $zeerex) = @_;
if (!defined $zeerex) {
$zeerex = _empty_zeerex_record($target);
if (!defined $zeerex) {
$zeerex = _empty_zeerex_record($target);
@@
-34,6
+37,7
@@
sub new {
my $parser = new XML::LibXML();
return bless {
my $parser = new XML::LibXML();
return bless {
+ irspy => $irspy,
target => $target,
parser => $parser,
zeerex => $parser->parse_string($zeerex)->documentElement(),
target => $target,
parser => $parser,
zeerex => $parser->parse_string($zeerex)->documentElement(),
@@
-101,8
+105,8
@@
sub append_entry {
if @nodes == 0;
}
if @nodes == 0;
}
- ZOOM::Log::log("irspy",
- scalar(@nodes), " matches for '$xpath': using first")
+ $this->{irspy}->log("irspy",
+ scalar(@nodes), " matches for '$xpath': using first")
if @nodes > 1;
$this->_half_decent_appendWellBalancedChunk($nodes[0], $frag);
if @nodes > 1;
$this->_half_decent_appendWellBalancedChunk($nodes[0], $frag);