| 1 | use Test::More qw(no_plan); |
| 2 | use strict; |
| 3 | use warnings; |
| 4 | |
| 5 | use autobox::Core; |
| 6 | |
| 7 | my $string = 'HELLO'; |
| 8 | $string->s('^HE', 'Hu'); |
| 9 | |
| 10 | is $string, 'HuLLO'; |
| 11 | |
| 12 | ok $string->s(qr/LO/, '10') eq 'HuL10'; # using ok() instead of is() to test Want picking up on scalar context |
| 13 | |
| 14 | ok ! $string->s(qr/LO/, '10'); # testing Want picking up on boolean context |
| 15 | ok ! ! $string->s(qr/10/, 'lo'); # testing Want picking up on boolean context |
| 16 |