aboutsummaryrefslogtreecommitdiff
path: root/devel/p5-Sub-Override/pkg-descr
blob: 9b12dc956087ab2bd65dd385479d70a0fb2dd14b (plain) (blame)
1
2
3
4
5
6
7
8
Sub::Override allows the programmer to simply name the sub to replace
and to supply a sub to replace it with.

  my $override = Sub::Override->new('Some::sub', sub {'new data'});

  # which is equivalent to:
  my $override = Sub::Override->new;
  $override->replace('Some::sub', sub { 'new data' });