+2.021 Dec 31 2013
+ - Make Dwarn output all arguments even in scalar context
+ (retun val is still the same though)
+
2.020 Jan 20 2011
- Add DumperObject for getting at the underlying obj
- create DwarnF for formatting Dumper'd output
$Ddie $DdieN Ddie DdieS DdieL DdieN DdieD
);
-sub Dwarn { return DwarnL(@_) if wantarray; DwarnS($_[0]) }
+sub Dwarn { DwarnL(@_); return wantarray ? @_ : $_[0] }
our $Dwarn = \&Dwarn;
our $DwarnN = \&DwarnN;
sub DwarnF (&@) { my $c = shift; warn &Data::Dumper::Concise::DumperF($c, @_); @_ }
-sub Ddie { DdieL(@_) if wantarray; DdieS($_[0]) }
+sub Ddie { DdieL(@_); return wantarray ? @_ : $_[0] }
our $Ddie = \&Ddie;
our $DdieN = \&DdieN;
ok eq_array(\@foo, ['warn','friend']), 'Dwarn passes lists through correctly';
my $bar = Dwarn 'robot',2,3;
- is $warned_string,qq{"robot"\n}, 'Dwarn warns scalars correctly';
+ is $warned_string,qq{"robot"\n2\n3\n}, 'Dwarn warns scalars correctly';
is $bar, 'robot', 'Dwarn passes scalars through correctly';
}