Skip to content

Instantly share code, notes, and snippets.

@tsee
Created September 13, 2009 07:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tsee/186114 to your computer and use it in GitHub Desktop.
Save tsee/186114 to your computer and use it in GitHub Desktop.
package MyRect;
use base 'SDL::Rect';
sub new {
my $class = shift;
my $self = $class->SUPER::new(@_);
unless (ref $self) {
require Carp;
Carp::croak SDL::GetError();
}
return bless $self => $class;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment