libxml-quote-perl-1.02/0000755000175000017500000000000011221136071014004 5ustar cajuscajuslibxml-quote-perl-1.02/MANIFEST0000644000175000017500000000011611030661521015134 0ustar cajuscajusChanges MANIFEST Makefile.PL README Quote.pm Quote.xs t/benchmark.pl t/quote.tlibxml-quote-perl-1.02/t/0000755000175000017500000000000011221136071014247 5ustar cajuscajuslibxml-quote-perl-1.02/t/benchmark.pl0000755000175000017500000000233311030661521016543 0ustar cajuscajus#!/usr/bin/perl # $Version: release/perl/base/XML-Quote/t/benchmark.pl,v 1.4 2003/01/25 13:17:41 godegisel Exp $ use strict; use XML::Quote; use Benchmark; use utf8; use vars qw(@TESTS_0 @TESTS_1); @TESTS_0=( 'plain text without any special symbols', q{some symbols & "" ''''><<}, 44, 123.11, 'некий "тест >в <\'ютф8 &', ); timethese(1_000_000,{ 'xs quote' => sub { my $res; for my $t (@TESTS_0) { $res=xml_quote($t); } }, 'perl quote' => sub { my $res; for my $t (@TESTS_0) { $res=perl_quote($t); } }, }); @TESTS_1=( 'plain text without any special symbols', q{some symbols & "" ''' > <<}, 44, 123.11, 'некий "тест >в <'ютф8 &', ); timethese(1_000_000,{ 'xs dequote' => sub { my $res; for my $t (@TESTS_1) { $res=xml_dequote($t); } }, 'perl dequote' => sub { my $res; for my $t (@TESTS_1) { $res=perl_dequote($t); } }, }); sub perl_quote { my $str=shift; $str=~s/&/&/g; $str=~s/"/"/g; $str=~s/'/'/g; $str=~s/>/>/g; $str=~s//g; $str=~s/</ sub {${$_[0]} ? 'true' : 'false'}; sub new { my $v=$_[1]; bless \$v, $_[0]; } package TEST_TIED; sub TIESCALAR { my $val=$_[1]; bless \$val, $_[0]; } sub FETCH { uc(${$_[0]}); } sub STORE { ${$_[0]}=$_[1]; } package main; use strict; use utf8; use Test::More tests => 48; BEGIN {use_ok('XML::Quote')}; my @tests=( [ "amp", "amp", ], [ "&", "&", ], [ qq{&"'><}, "&"'><", ], [ "&", "&amp;", ], [ "\0", "\0", ], [ 'plain text without any special symbols', 'plain text without any special symbols', ], [ 44, 44, ], [ 123.11, 123.11, ], [ 'некий "тест >в <\'ютф8 &', q{некий "тест >в <'ютф8 &}, ], ); my ($to_quote, $expected, $quoted, $dequoted); for my $arr (@tests) { my ($to_quote, $expected)=@$arr; my $quoted=XML::Quote::xml_quote($to_quote); is($quoted, $expected, 'xml_quote:'.$to_quote); my $dequoted=XML::Quote::xml_dequote($quoted); is($dequoted, $to_quote, 'xml_dequote:'.$expected); }#for my @tests_min=( [ "amp", "amp", ], [ "&", "&", ], [ qq{&"'><}, "&"'><", ], [ "\0", "\0", ], [ 'plain text without any special symbols', 'plain text without any special symbols', ], [ 44, 44, ], [ 123.11, 123.11, ], [ 'некий "тест >в <\'ютф8 &', q{некий "тест >в <'ютф8 &}, ], ); for my $arr (@tests_min) { my ($to_quote, $expected)=@$arr; my $quoted=XML::Quote::xml_quote_min($to_quote); is($quoted, $expected, 'xml_quote_min:'.$to_quote); my $dequoted=XML::Quote::xml_dequote($quoted); is($dequoted, $to_quote, 'xml_dequote:'.$expected); }#for my @tests_overload=( [ TEST_OVERLOAD->new(1), 'true', ], [ TEST_OVERLOAD->new(0), 'false', ], ); for my $arr (@tests_overload) { my ($to_quote, $expected)=@$arr; my $quoted=XML::Quote::xml_quote($to_quote); is($quoted, $expected, 'over xml_quote:'.$to_quote); my $dequoted=XML::Quote::xml_dequote($quoted); is($dequoted, "$to_quote", 'over xml_dequote:'.$expected); }#for tie(my $tied_scalar,'TEST_TIED'); $tied_scalar='test&rest'; my @tests_tied=( [ $tied_scalar, 'TEST&REST', ], ); use Devel::Peek; for my $arr (@tests_tied) { my ($to_quote, $expected)=@$arr; my $quoted=XML::Quote::xml_quote($to_quote); is($quoted, $expected, 'tied xml_quote:'.$to_quote); my $dequoted=XML::Quote::xml_dequote($quoted); is($dequoted, "$to_quote", 'tied xml_dequote:'.$expected); }#for my @tests2=( ['&','&'], ['"','"'], [''','\''], ['><','><'], ['&160','&160'], ['&;','&;'], ['&','&'], ); #use Devel::Peek; for my $arr (@tests2) { my ($bef,$aft)=@$arr; # Dump($bef); my $cvt=XML::Quote::xml_dequote($bef); # Dump($aft); # Dump($cvt); is($cvt, $aft, 'xml_dequote:'.$bef); }#for libxml-quote-perl-1.02/debian/0000755000175000017500000000000011221136071015226 5ustar cajuscajuslibxml-quote-perl-1.02/debian/watch0000644000175000017500000000034711030661521016264 0ustar cajuscajus# format version number, currently 3; this line is compulsory! version=3 # URL to the package page followed by a regex to search http://search.cpan.org/dist/XML-Quote/ .*/XML-Quote-v?(\d[\d_.-]+)\.(?:tar(?:\.gz|\.bz2)?|tgz|zip)$ libxml-quote-perl-1.02/debian/rules0000755000175000017500000000364611030661521016320 0ustar cajuscajus#!/usr/bin/make -f # This debian/rules file is provided as a template for normal perl # packages. It was created by Marc Brockschmidt for # the Debian Perl Group (http://pkg-perl.alioth.debian.org/) but may # be used freely wherever it is useful. # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 # If set to a true value then MakeMaker's prompt function will # always return the default without waiting for user input. export PERL_MM_USE_DEFAULT=1 PERL ?= /usr/bin/perl PACKAGE = $(shell dh_listpackages) TMP = $(CURDIR)/debian/$(PACKAGE) # Allow disabling build optimisation by setting noopt in # $DEB_BUILD_OPTIONS CFLAGS = -Wall -g ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) CFLAGS += -O0 else CFLAGS += -O2 endif build: build-stamp build-stamp: dh_testdir # Add commands to compile the package here $(PERL) Makefile.PL INSTALLDIRS=vendor $(MAKE) OPTIMIZE="$(CFLAGS)" LD_RUN_PATH="" $(MAKE) test touch $@ clean: dh_testdir dh_testroot dh_clean build-stamp install-stamp # Add commands to clean up after the build process here [ ! -f Makefile ] || $(MAKE) realclean install: install-stamp install-stamp: build-stamp dh_testdir dh_testroot dh_clean -k # Add commands to install the package into $(TMP) $(MAKE) install DESTDIR=$(TMP) PREFIX=/usr [ ! -d $(TMP)/usr/share/perl5 ] || \ rmdir --ignore-fail-on-non-empty --parents --verbose \ $(TMP)/usr/share/perl5 touch $@ # Build architecture-independent files here. binary-indep: build install # We have nothing to do here for an architecture-dependent package # Build architecture-dependent files here. binary-arch: build install dh_testdir dh_testroot dh_installdocs README dh_installchangelogs Changes dh_shlibdeps dh_strip dh_perl dh_compress dh_fixperms dh_installdeb dh_gencontrol dh_md5sums dh_builddeb binary: binary-indep binary-arch .PHONY: build clean binary-indep binary-arch binary install libxml-quote-perl-1.02/debian/compat0000644000175000017500000000000211030661521016425 0ustar cajuscajus5 libxml-quote-perl-1.02/debian/copyright0000644000175000017500000000153511046046610017171 0ustar cajuscajusThis is the debian package for the XML-Quote module. It was created by Cajus Pollmeier . It was downloaded from http://search.cpan.org/dist/XML-Quote/ The upstream author is: Sergey Skvortsov . Copyright 2003 Sergey Skvortsov . All rights reserved. This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. Perl is distributed under your choice of the GNU General Public License or the Artistic License. On Debian GNU/Linux systems, the complete text of the GNU General Public License can be found in `/usr/share/common-licenses/GPL' and the Artistic Licence in `/usr/share/common-licenses/Artistic'. The Debian packaging is (C) 2008, Cajus Pollmeier and is licensed under the same terms as the software itself (see above). libxml-quote-perl-1.02/debian/changelog0000644000175000017500000000024011221136067017101 0ustar cajuscajuslibxml-quote-perl (1.02-1) unstable; urgency=low * Initial upload (Closes: #532684) -- Cajus Pollmeier Tue, 24 Jun 2009 10:18:00 +0200 libxml-quote-perl-1.02/debian/control0000644000175000017500000000154411221136067016642 0ustar cajuscajusSource: libxml-quote-perl Section: perl Priority: optional Build-Depends: debhelper (>= 5), perl (>= 5.6.10-12) Maintainer: GOsa packages mainteners group Uploaders: Cajus Pollmeier , Benoit Mortier Standards-Version: 3.8.2 Homepage: http://search.cpan.org/dist/XML-Quote/ Vcs-Browser: https://oss.gonicus.de/repositories/goto/trunk/libxml-quote-perl Vcs-Svn: https://oss.gonicus.de/repositories/goto/trunk/libxml-quote-perl Package: libxml-quote-perl Architecture: any Depends: ${perl:Depends}, ${shlibs:Depends}, ${misc:Depends} Description: XML quote/dequote functions This module provides functions to quote/dequote strings in "xml"-way. . All functions are written in XS and are very fast; they correctly process utf8, tied, overloaded variables and all the rest of perl "magic". . libxml-quote-perl-1.02/Quote.xs0000644000175000017500000002057111030661521015463 0ustar cajuscajus/* $Version: release/perl/base/XML-Quote/Quote.xs,v 1.12 2003/01/31 09:16:58 godegisel Exp $ */ #ifdef __cplusplus extern "C" { #endif #include "EXTERN.h" #include "perl.h" #include "XSUB.h" #ifdef __cplusplus } #endif #define XQ_DEBUG 0 #ifdef SVf_UTF8 #define XML_Util_UTF8 #endif ////////////////////////////////////////////////////////////////////////////// // '"'==0x22 " 5 // '&'==0x26 & 4 // '\''==0x27 ' 5 // '<'==0x3C < 3 // '>'==0x3E > 3 static STRLEN XQ_quote_add[] = { // 0x00 - 0x0F 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, // 0x10 - 0x1F 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, // 0x20 - 0x2F 0,0,5,0,0,0,4,5,0,0,0,0,0,0,0,0, // 0x30 - 0x3F 0,0,0,0,0,0,0,0,0,0,0,0,3,0,3,0, }; static STRLEN XQ_quote_add_min[] = { // 0x00 - 0x0F 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, // 0x10 - 0x1F 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, // 0x20 - 0x2F 0,0,5,0,0,0,4,0,0,0,0,0,0,0,0,0, // 0x30 - 0x3F 0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0, }; ////////////////////////////////////////////////////////////////////////////// static SV * xml_quote(SV * srcSV) { SV * dstSV; unsigned char * src, * src2; unsigned char * dst; unsigned char c; STRLEN src_len, src_len2, dst_len, offset; src=SvPV(srcSV, src_len); //length without trailing \0 #if XQ_DEBUG warn("source=%s\n",src); warn("src=%p\n",src); #endif dst_len=src_len; src2=src; src_len2=src_len; #if XQ_DEBUG warn("source length=%i\n",src_len); #endif // calculate target string length while(src_len2--) { c=*src2++; if(c < 0x3F && (offset=XQ_quote_add[c]) ) { #if XQ_DEBUG warn("add offset=%i [symbol=%i]\n",offset,c); #endif dst_len+=offset; } /* table lookup is faster (or not?...) if(c > 0x3E || c < 0x22) { // || < 0x22 continue; } if('&'==c) { // 0x26 // & dst_len+=4; }else if('"'==c) { // 0x22 // " dst_len+=5; }else if('\''==c) { // 0x27 // ' dst_len+=5; }else if('<'==c) { // 0x3C // < dst_len+=3; }else if('>'==c) { // 0x3E // > dst_len+=3; }//if */ }//while if(dst_len == src_len) { #if XQ_DEBUG warn("nothing to quote\n"); #endif // nothing to quote dstSV=newSVpv(src, dst_len); #ifdef XML_Util_UTF8 if(SvUTF8(srcSV)) SvUTF8_on(dstSV); #endif return dstSV; } #if XQ_DEBUG warn("dest length=%i\n",dst_len); #endif dstSV=newSV(dst_len); SvCUR_set(dstSV, dst_len); SvPOK_on(dstSV); #ifdef XML_Util_UTF8 if(SvUTF8(srcSV)) SvUTF8_on(dstSV); #endif dst=SvPVX(dstSV); while(src_len--) { // \0 also copied c=*src++; #if XQ_DEBUG warn("src_len=%i symbol=%c src=%lx\n",src_len,c,src); #endif // if(c > 0x3E || c < 0x22) { if(c > 0x3E || ! XQ_quote_add[c]) { *dst++=c; continue; } /* it's overkill #ifdef XML_Util_UTF8 // really 'dst_len' has other semantic (i.e. 'sym_len') // I just reuse it ;) dst_len=PL_utf8skip[c]; //dst_len=UTF8SKIP(c); if(dst_len > 1) { *dst++=c; while(--dst_len) { *dst++=*src++; src_len--; } continue; } #endif */ *dst++='&'; if('&'==c) { // 0x26 // & *dst++='a'; *dst++='m'; *dst++='p'; }else if('>'==c) { // 0x3E // > *dst++='g'; *dst++='t'; }else if('<'==c) { // 0x3C // < *dst++='l'; *dst++='t'; }else if('"'==c) { // 0x22 // " *dst++='q'; *dst++='u'; *dst++='o'; *dst++='t'; // }else if('\''==c) { // 0x27 }else { // ' *dst++='a'; *dst++='p'; *dst++='o'; *dst++='s'; }//if *dst++=';'; }//while return dstSV; } ////////////////////////////////////////////////////////////////////////////// static SV * xml_quote_min(SV * srcSV) { SV * dstSV; unsigned char * src, * src2; unsigned char * dst; unsigned char c; STRLEN src_len, src_len2, dst_len, offset; src=SvPV(srcSV, src_len); //length without trailing \0 #if XQ_DEBUG warn("source=%s\n",src); warn("src=%p\n",src); #endif dst_len=src_len; src2=src; src_len2=src_len; #if XQ_DEBUG warn("source length=%i\n",src_len); #endif // calculate target string length while(src_len2--) { c=*src2++; if(c < 0x3D && (offset=XQ_quote_add_min[c]) ) { #if XQ_DEBUG warn("add offset=%i [symbol=%i]\n",offset,c); #endif dst_len+=offset; } }//while if(dst_len == src_len) { #if XQ_DEBUG warn("nothing to quote\n"); #endif // nothing to quote dstSV=newSVpv(src, dst_len); #ifdef XML_Util_UTF8 if(SvUTF8(srcSV)) SvUTF8_on(dstSV); #endif return dstSV; } #if XQ_DEBUG warn("dest length=%i\n",dst_len); #endif dstSV=newSV(dst_len); SvCUR_set(dstSV, dst_len); SvPOK_on(dstSV); #ifdef XML_Util_UTF8 if(SvUTF8(srcSV)) SvUTF8_on(dstSV); #endif dst=SvPVX(dstSV); while(src_len--) { // \0 also copied c=*src++; #if XQ_DEBUG warn("src_len=%i symbol=%c src=%lx\n",src_len,c,src); #endif if(c > 0x3C || ! XQ_quote_add_min[c]) { *dst++=c; continue; } *dst++='&'; if('&'==c) { // 0x26 // & *dst++='a'; *dst++='m'; *dst++='p'; }else if('<'==c) { // 0x3C // < *dst++='l'; *dst++='t'; // }else if('"'==c) { // 0x22 }else { // " *dst++='q'; *dst++='u'; *dst++='o'; *dst++='t'; }//if *dst++=';'; }//while return dstSV; } ////////////////////////////////////////////////////////////////////////////// static SV * xml_dequote(SV * srcSV) { SV * dstSV; unsigned char * src, *src2; unsigned char * dst; unsigned char c,c1,c2,c3,c4; STRLEN src_len, src_len2, dst_len; src=SvPV(srcSV, src_len); //length without trailing \0 // warn("src_len=%i",src_len); src2=src; src_len2=src_len; dst_len=src_len; // calculate dequoted string length while(src_len >=3) { c=*src++; src_len--; if('&'!=c) { continue; } /* & " ' < > */ c=*src; c1=*(src+1); c2=*(src+2); if(c2==';' && c1=='t' && (c=='l' || c=='g')) { dst_len-=3; src+=3; src_len-=3; continue; } if(src_len >= 4) { c3=*(src+3); }else { continue; } if(c=='a' && c1=='m' && c2=='p' && c3==';') { dst_len-=4; src+=4; src_len-=4; continue; } if(src_len >= 5) { c4=*(src+4); }else { continue; } if(c4==';' && ( (c=='q' && c1=='u' && c2=='o' && c3=='t') || (c=='a' && c1=='p' && c2=='o' && c3=='s') ) ) { dst_len-=5; src+=5; src_len-=5; continue; }//if }//while if(dst_len == src_len2) { // nothing to dequote dstSV=newSVpv(src2, dst_len); #ifdef XML_Util_UTF8 if(SvUTF8(srcSV)) SvUTF8_on(dstSV); #endif // warn("nothing to dequote"); return dstSV; } // dstSV=newSVpv("", dst_len); dstSV=newSV(dst_len); SvCUR_set(dstSV, dst_len); SvPOK_on(dstSV); #ifdef XML_Util_UTF8 if(SvUTF8(srcSV)) SvUTF8_on(dstSV); #endif dst=SvPVX(dstSV); while(src_len2>=3) { // 3 is min length of quoted symbol c=*src2++; src_len2--; if('&'!=c) { *dst++=c; continue; } c=*src2; c1=*(src2+1); c2=*(src2+2); // 1. test len=3: < > if(c1=='t' && c2==';') { if(c=='l') { *dst++='<'; src2+=3; src_len2-=3; continue; }else if(c=='g') { *dst++='>'; }else { *dst++='&'; continue; } src2+=3; src_len2-=3; continue; }//if lt | gt // 2. test len=4: & if(src_len2 >= 4) { c3=*(src2+3); }else { *dst++='&'; continue; } if(c=='a' && c1=='m' && c2=='p' && c3==';') { *dst++='&'; src2+=4; src_len2-=4; continue; } // 3. test len=5: " ' if(src_len2 >= 5) { c4=*(src2+4); }else { *dst++='&'; continue; } if(c4==';') { if(c=='q' && c1=='u' && c2=='o' && c3=='t') { *dst++='"'; }else if(c=='a' && c1=='p' && c2=='o' && c3=='s') { *dst++='\''; }else { *dst++='&'; continue; } src2+=5; src_len2-=5; continue; }//if ; *dst++='&'; }//while while(src_len2-- > 0) { // also copy trailing \0 *dst++=*src2++; } return dstSV; } ////////////////////////////////////////////////////////////////////////////// MODULE = XML::Quote PACKAGE = XML::Quote SV * xml_quote(string) SV *string INIT: if(!SvOK(string)) { XSRETURN_UNDEF; } CODE: RETVAL = xml_quote(string); OUTPUT: RETVAL SV * xml_quote_min(string) SV *string INIT: if(!SvOK(string)) { XSRETURN_UNDEF; } CODE: RETVAL = xml_quote_min(string); OUTPUT: RETVAL SV * xml_dequote(string) SV *string INIT: if(!SvOK(string)) { XSRETURN_UNDEF; } CODE: RETVAL = xml_dequote(string); OUTPUT: RETVAL libxml-quote-perl-1.02/Makefile.PL0000755000175000017500000000064411030661521015766 0ustar cajuscajus#!/usr/bin/perl use ExtUtils::MakeMaker; # $Version: release/perl/base/XML-Quote/Makefile.PL,v 1.2 2003/01/24 13:41:54 godegisel Exp $ WriteMakefile( 'NAME' => 'XML::Quote', 'VERSION_FROM' => 'Quote.pm', 'PREREQ_PM' => {}, ($] >= 5.005 ? (ABSTRACT_FROM => 'Quote.pm', AUTHOR => 'Sergey Skvortsov ') : ()), 'LIBS' => [''], 'DEFINE' => '', 'INC' => '', ); libxml-quote-perl-1.02/Changes0000644000175000017500000000032411030661521015277 0ustar cajuscajusRevision history for Perl extension XML::Quote. 1.02 Fri Jan 31 13:20:01 2003 - minor utf8-related fix 1.01 Sat Jan 25 13:17:40 2003 - add xml_quote_min 1.00 Thu Jan 23 18:17:48 2003 - original version libxml-quote-perl-1.02/README0000644000175000017500000000100111030661521014655 0ustar cajuscajusModule: XML::Quote Description: XML::Quote provides functions to quote/dequote strings in "xml"-way. Copying: Copyright 2003 Sergey Skvortsov. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. Prerequisites: perl 5.005_03 Build/Installation: Standard build/installation supported by ExtUtils::MakeMaker(3)... perl Makefile.PL make make test make install Author: Sergey Skvortsov libxml-quote-perl-1.02/Quote.pm0000644000175000017500000000577511030661521015456 0ustar cajuscajuspackage XML::Quote; # $Version: release/perl/base/XML-Quote/Quote.pm,v 1.6 2003/01/31 09:03:57 godegisel Exp $ use strict; use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS); require Exporter; require DynaLoader; require AutoLoader; @ISA = qw(Exporter DynaLoader); @EXPORT = qw( xml_quote xml_dequote ); @EXPORT_OK = qw( xml_quote xml_dequote xml_quote_min ); %EXPORT_TAGS = ( all => [qw( xml_quote xml_dequote xml_quote_min )], ); $VERSION = '1.02'; bootstrap XML::Quote $VERSION; 1; __END__ =pod =head1 NAME XML::Quote - XML quote/dequote functions =head1 SYNOPSIS use strict; use XML::Quote qw(:all); my $str=q{666 > 444 & "apple" < 'earth'}; print xml_quote($str),"\n"; # 666 > 444 & "apple" < 'earth' my $str2=q{666 > 444 & "apple" < 'earth'}; print xml_dequote($str2),"\n"; # 666 > 444 & "apple" < 'earth' my $str3=q{666 > 444 & "apple" < 'earth'}; print xml_quote_min($str3),"\n"; # 666 > 444 & "apple" < 'earth' =head1 DESCRIPTION This module provides functions to quote/dequote strings in "xml"-way. All functions are written in XS and are very fast; they correctly process utf8, tied, overloaded variables and all the rest of perl "magic". =head1 FUNCTIONS =over 4 =item $quoted = xml_quote($str); This function replaces all occurences of symbols '&', '"', ''', '>', '<' to '&', '"', ''', '>', '<' respectively. Returns quoted string or undef if $str is undef. =item $dequoted = xml_dequote($str); This function replaces all occurences of '&', '"', ''', '>', '<' to '&', '"', ''', '>', '<' respectively. All other entities (for example  ) will not be touched. Returns dequoted string or undef if $str is undef. =item $quoted = xml_quote_min($str); This function replaces all occurences of symbols '&', '"', '<' to '&', '"', '<' respectively. Symbols ''' and '>' are not replaced. Returns quoted string or undef if $str is undef. =back =head1 EXPORT xml_quote(), xml_dequote() are exported as default. =head1 PERFORMANCE You can use t/benchmark.pl to test the perfomance. Here is the result on my P4 box. Benchmark: timing 1000000 iterations of perl quote, xs quote... perl quote: 108 wallclock secs (88.08 usr + 0.01 sys = 88.09 CPU) @ 11351.64/s (n=1000000) xs quote: 20 wallclock secs (16.78 usr + 0.00 sys = 16.78 CPU) @ 59591.20/s (n=1000000) Benchmark: timing 1000000 iterations of perl dequote, xs dequote... perl dequote: 106 wallclock secs (85.22 usr + 0.09 sys = 85.31 CPU) @ 11721.54/s (n=1000000) xs dequote: 19 wallclock secs (15.92 usr + 0.02 sys = 15.94 CPU) @ 62743.13/s (n=1000000) =head1 AUTHOR Sergey Skvortsov Eskv@protey.ruE =head1 SEE ALSO L, L =head1 COPYRIGHT Copyright 2003 Sergey Skvortsov Eskv@protey.ruE. All rights reserved. This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =cut