: eval 'exec perl -w -S `echo $0 | sed "s/.*\///" ` ${1+"$@"}' if 0; @a=@ARGV; @flags=grep(/^-/,@a); @other=(); @other=grep(!/^-/,@a); if ( grep( /^-h(elp)?$/,@flags) || scalar(@other) != 1) { $scriptName = $0; $scriptName =~ s%^.*/%%; print <<"END"; Usage: $scriptName [-h -help] Name Print out a prototype of a new java exception with the name "NameException". The class is declared static for inclusion as a public inner class. END exit;} $rN="\n"; $rN="\n" if ( ! -d "/var" ); $Class="$a[0]Exception"; print <<"END"; /** */ public static class $Class extends Exception { private static final long serialVersionUID = 1L; /** \@param reason Description of this Exception */ public $Class(String reason) {super (reason);} /** \@param reason Description of this Exception \@param cause The cause of this Exception */ public $Class(String reason, Exception cause) { super (reason); initCause(cause); } /** \@param cause The cause of this Exception */ public $Class(Exception cause) { super (cause.toString()); initCause(cause); } } END