Acme::Damn man page on Mandriva

Man page or keyword search:  
man Server   17060 pages
apropos Keyword Search (all sections)
Output format
Mandriva logo
[printable version]

Damn(3)		      User Contributed Perl Documentation	       Damn(3)

NAME
       Acme::Damn - 'Unbless' Perl objects.

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 ...

DESCRIPTION
       Acme::Damn provides a single routine, damn(), which takes a blessed
       reference (a Perl object), and unblesses 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.

       EXPORT

       By default, Acme::Damn exports the method damn() into the current
       namespace. Aliases for damn() (see below) may be imported upon request.

       Methods

       damn object
	   damn() accepts a single blessed reference as its argument, and
	   returns that reference unblessed. If object is not a blessed
	   reference, then damn() will "die" with an error.

       Method Aliases

       Not everyone likes to damn the same way or in the same language, so
       Acme::Damn offers the ability to specify any alias on import, provided
       that alias is a valid Perl subroutine name (i.e. all characters match
       "\w").

	 use Acme::Damn qw( unbless );
	 use Acme::Damn qw( foo );
	 use Acme::Damn qw( unblessthyself );
	 use Acme::Damn qw( recant );

       Version 0.02 supported a defined list of aliases, and this has been
       replaced in v0.03 by the ability to import any alias for "damn()".

WARNING
       Just as "bless" doesn't call an object's initialisation code, "damn"
       doesn't invoke an object's "DESTROY" method. For objects that need to
       be "DESTROY"ed, either don't "damn" them, or call "DESTROY" before
       judgement is passed.

ACKNOWLEDGEMENTS
       Thanks to Claes Jacobsson <claes@surfar.nu> for suggesting the use of
       aliases.

SEE ALSO
       bless, perlboot, perltoot, perltooc, perlbot, perlobj.

AUTHOR
       Ian Brayshaw, <ian@onemore.org>

COPYRIGHT AND LICENSE
       Copyright 2003-2006 Ian Brayshaw

       This library is free software; you can redistribute it and/or modify it
       under the same terms as Perl itself.

perl v5.10.0			  2009-05-15			       Damn(3)
[top]

List of man pages available for Mandriva

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net