From: Rafael Garcia-Suarez Date: Mon, 13 Nov 2006 09:55:11 +0000 (+0000) Subject: POD fixes and nits in re.pm X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=4ee9a43fc6da67e288ad28c03afa1b21a0a03720;p=p5sagit%2Fp5-mst-13.2.git POD fixes and nits in re.pm p4raw-id: //depot/perl@29255 --- diff --git a/ext/re/re.pm b/ext/re/re.pm index e9d710f..0367be8 100644 --- a/ext/re/re.pm +++ b/ext/re/re.pm @@ -195,16 +195,15 @@ re - Perl pragma to alter regular expression behaviour ... use re qw(Debug All); # Finer tuned debugging options. - use re qw(Debug More); + use re qw(Debug More); no re qw(Debug ALL); # Turn of all re debugging in this scope - + use re qw(is_regexp regexp_pattern); # import utility functions my ($pat,$mods)=regexp_pattern(qr/foo/i); if (is_regexp($obj)) { print "Got regexp: ", scalar regexp_pattern($obj); # just as perl would stringify it } # but no hassle with blessed re's. - (We use $^X in these examples because it's tainted by default.) @@ -289,7 +288,6 @@ Detailed info about trie compilation. Dump the final program out after it is compiled and optimised. - =back =item Execute related options @@ -329,7 +327,7 @@ and TRIEC. =item STATE -Enable debugging of states in the engine. +Enable debugging of states in the engine. =item STACK @@ -391,13 +389,13 @@ Enable TRIEM and all execute compile and execute options. =back As of 5.9.5 the directive C and its equivalents are -lexically scoped, as the other directives are. However they have both +lexically scoped, as the other directives are. However they have both compile-time and run-time effects. =head2 Exportable Functions As of perl 5.9.5 're' debug contains a number of utility functions that -may be optionally exported into the callers namespace. They are listed +may be optionally exported into the caller's namespace. They are listed below. =over 4 @@ -405,34 +403,34 @@ below. =item is_regexp($ref) Returns true if the argument is a compiled regular expression as returned -by C, false if it is not. +by C, false if it is not. -This function will not be confused by overloading or blessing. In -internals terms this extracts the regexp pointer out of the +This function will not be confused by overloading or blessing. In +internals terms, this extracts the regexp pointer out of the PERL_MAGIC_qr structure so it it cannot be fooled. =item regexp_pattern($ref) -If the argument is a compiled regular expression as returned by C -then this function returns the pattern. +If the argument is a compiled regular expression as returned by C, +then this function returns the pattern. -In list context it returns a two element list, the first element -containing the pattern and the second containing the modifiers used when -the pattern was compiled. +In list context it returns a two element list, the first element +containing the pattern and the second containing the modifiers used when +the pattern was compiled. - my ($pat,$mods)=regexp_pattern($ref); + my ($pat, $mods) = regexp_pattern($ref); -In scalar context it returns the same as perl would when strigifying a -raw qr// with the same pattern inside. If the argument is not a -compiled reference then this routine returns false but defined in scalar -context, and the empty list in list context. Thus the following +In scalar context it returns the same as perl would when strigifying a raw +C with the same pattern inside. If the argument is not a compiled +reference then this routine returns false but defined in scalar context, +and the empty list in list context. Thus the following if (regexp_pattern($ref) eq '(?i-xsm:foo)') will be warning free regardless of what $ref actually is. -Like c this function will not be confused by overloading -or blessing of the object. +Like C this function will not be confused by overloading +or blessing of the object. =back