# $Id: Damn.pm,v 1.8 2003/06/10 18:18:34 ian Exp $ package Acme::Damn; use 5.000; use strict; require Exporter; require DynaLoader; use vars qw( $VERSION @ISA @EXPORT @EXPORT_OK ); $VERSION = '0.02'; @ISA = qw( Exporter DynaLoader ); @EXPORT = qw( damn ); @EXPORT_OK = qw( abjure anathematize condemn curse excommunicate excoriate expel proscribe recant renounce unbless ); bootstrap Acme::Damn $VERSION; 1; __END__ =pod =head1 NAME Acme::Damn - 'Unbless' Perl objects. =head1 SYNOPSIS use Acme::Damn; my $ref = ... some reference ... my $obj = bless $ref , 'Some::Class'; ... do something with your object ... $ref = damn $obj; # recover the original reference (unblessed) ... neither $ref nor $obj are Some::Class objects ... =head1 DESCRIPTION B provides a single routine, B, which takes a blessed reference (a Perl object), and I it, to return the original reference. I can't think of any reason why you might want to do this, but just because it's of no use doesn't mean that you shouldn't be able to do it. =head2 EXPORT By default, B exports the method B into the current namespace. Aliases for B (see below) may be imported upon request. =head2 Methods =over 4 =item B I B accepts a single blessed reference as its argument, and returns that reference unblessed. If I is not a blessed reference, then B will C with an error. =back =head2 Method Aliases Not everyone likes to damn the same way, so B offers a list of aliases for B that may be imported upon request: use Acme::Damn qw( unbless ); The following aliases are supported: =over 4 =item * B =item * B =item * B =item * B =item * B =item * B =item * B =item * B =item * B =item * B =item * B =back =head1 WARNING Just as C doesn't call an object's initialisation code, C doesn't invoke an object's C method. For objects that need to be Ced, either don't C them, or call C before judgement is passed. =head1 ACKNOWLEDGEMENTS Thanks to Claes Jacobsson Eclaes@surfar.nuE for suggesting the use of aliases. =head1 SEE ALSO L, L, L, L, L, L. =head1 AUTHOR Ian Brayshaw, Eian@onemore.orgE =head1 COPYRIGHT AND LICENSE Copyright 2003 by Ian Brayshaw This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =cut