Acme-Damn
view release on metacpan or search on metacpan
0.06 Sun Oct 26 20:50:12 2014
- support for Perl >= v5.18
0.05 Tue Feb 14 12:10:59 2012
- added support for modified bless() behaviour as suggested by
Bo Lindbergh <blgl@cpan.org>
- see https://rt.cpan.org/Ticket/Display.html?id=74899
0.04 Sat May 16 10:42:00 2009
- changed handling of PL_no_modify to comply with GCC's -Wformat and
-Werror=format-security
0.03 Sat Feb 5 00:09:32 2006
- added support for any alias, not just the ones defined in v0.02
0.02 Tue Jun 10 18:13:31 2003
- added support for aliases for damn() as suggested by
Claes Jacobsson <claes@surfar.nu>
0.01 Sun Jun 8 13:40:03 2003
- initial Acme::Damn release
SV *
bless( rv , ... )
SV * rv;
PROTOTYPE: $;$
CODE:
/*
** how many arguments do we have?
** - if we have two arguments, with the second being 'undef'
** then we call damn()
** - otherwise, we default to CORE::bless()
*/
if ( items == 2 && ! SvOK( ST(1) ) )
rv = __damn(rv);
else {
HV *stash;
STRLEN len;
const char *ptr;
SV *sv;
use strict;
use Test::More tests => 113;
use Test::Exception;
# load Acme::Damn, importing the replacement 'bless'
use Acme::Damn qw( bless );
#
# make sure bless displays the appropriate behaviour
# - if called with two arguments, with the second argument explicitly set
# set to 'undef', then default to damn()
# - otherwise fall back to CORE::bless()
#
# define some argument types for damn
my @array = ();
my %hash = ();
my $scalar = 0;
# set the patterns for matching bless exceptions
( run in 0.954 second using v1.01-cache-2.11-cpan-39bf76dae61 )