Skip to content

Instantly share code, notes, and snippets.

@berekuk
Created February 28, 2012 14:17
Show Gist options
  • Select an option

  • Save berekuk/1932793 to your computer and use it in GitHub Desktop.

Select an option

Save berekuk/1932793 to your computer and use it in GitHub Desktop.
package Wrap;
...
sub lag {
die unless $self->{wrapped}->DOES('Stream::Role::Lag');
return $self->{wrapped}->lag;
}
sub DOES {
return $self->{wrapped}->DOES(@_);
}
Wrap->new($object_implements_lag);
Wrap->new($object_doesnt_implement_lag);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment