GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  REGEXP::COPY (3)

.ds Aq ’

NAME

Regexp::Copy - copy Regexp objects

CONTENTS

SYNOPSIS



  use Regexp::Copy qw( re_copy );

  my $re1 = qr/Hello!/;
  my $re2 = qr/Goodbye!/;

  re_copy($re1, $re2);

  print "ok\n" if Goodbye! =~ $re1;



DESCRIPTION

Regexp::Copy allows you to copy the contents of one Regexp object to another. A problem that I have found with the qr// operator is that the Regexp objects that it creates are is impossible to dereference. This causes problems if you want to change the data in the regexp without losing the reference to it. Its impossible. Regexp::Copy allows you to change the Regexp by copying one object created through qr// to another.

This module came about through discussions on the London.pm mailing list in regards to attempts various people had made to serialize objects with qr// created Regexp objects in them. The Regex::Copy distribution also loads Regexp::Storable, which provides hooks to allow the Storable persistence method to freeze and thaw Regexp objects created by qr//.

FUNCTIONS

re_copy(FROM, TO) The re_copy function copies the regular expression magic contained within the variable FROM to the variable named in TO.

THANKS TO

Piers Cawley, who provided the magic Pixie::Info code, that forms the basis of Regexp::Copy.

AUTHOR

James A. Duncan <jduncan@fotango.com>

COPYRIGHT

Copyright 2002 All Rights Reserved.

This module is released under the same license as Perl itself.

Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 REGEXP::COPY (3) 2003-07-16

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.