NAME

warnin's - like warnings, but with more casual language


VERSION

Version 0.0.4


SYNOPSIS

  use strict;
  use warnin's; #turn warnin's on
  my ($x, $y);
  #warnings: Use of uninitialized value in addition (+) at z.pl line 16.
  #warnin's: Yer usin' a variable that ain't got a value in addition (+) at z.pl line 16. 
  $x = $x + 4;
  no warnin's; #turn warnin's off
  $y = $y + 1; #no warning
  use warnin's; #turn warnin's back on
  #warnings: Argument "" isn't numeric in numeric eq (==) at z.pl line 116.
  #warnin's: Suffering succatash! Ya used da strin' "" in numeric eq (==) at z.pl line 116.
  if ("" == 0) {
     $y++
  }


DESCRIPTION

This pragma works just like the warnings pragma, but replaces the normal warnings with "humorous" warnin's. Currently the following warnings have been replaced:

Use of uninitialized value

Yer usin' a variable that ain't got a value

Argument "%s" isn't numeric

Suffering succatash! Ya used da strin' "%s"
Even I know that "%s" ain't a number

Bareword found in conditional

Might wanna put your clothes on. Maybe.

Deep recursion on subroutine "%s"

Whoa there "%s"! Don't be running aroun' like chickin with its head cut off.
Man, I'm gettin' a headache in subroutine "%s"

Unquoted string "%s" may clash with future reserved word

I got dibs on %s. Pick yer own name

Bareword "%s" refers to nonexistent package

I got no idear what this "%s" sposta be

\1 better written as $1

do it the Perl way, son: $1, not \1

close() on unopened filehandle %s

Yer tryna close() %s what ain't been opened yet

Warning: something's wrong

Warning: WHAT the HECK
Warning: somethin' ain't right


AUTHOR

Chas. J. Owens IV, <chas.owens at gmail.com>


BUGS

Any code that parses warning mesages will likely fail.

It overrides the __WARN__ signal handler, so any code that also overrides it will stomp warnin's and vice versa

There are probably problems with how the messages are being changed

It is probably very slow.

saying no warnin's; and then use warnings; doesn't turn off warnin's (need to unhook the handler in unimport I guess).


ACKNOWLEDGEMENTS

James Mastros for spelling warnings incorrectly http://www.nntp.perl.org/group/perl.perl5.porters/2009/04/msg145454.html.

Ronald J Kimball for pointing out the mistake.

Others on StackOverflow.com for creating warnin' messages http://stackoverflow.com/questions/711117/what-warnings-would-you-like-a-warnins-pragma-to-throw

David Nicol for suggesting warnin's instead of warnins


COPYRIGHT & LICENSE

Copyright 2009 Chas. J. Owens IV, all rights reserved.

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