| 1 | package Bot::Cobalt::IRC::Event::Topic; | ||
| 2 | $Bot::Cobalt::IRC::Event::Topic::VERSION = '0.021002'; | ||
| 3 | 1 | ▶ | use strictures 2; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 1 | ▶ | use Bot::Cobalt::Common qw/:types :string/; |
|
Subroutine
BEGIN: called CC=1 SCAR=2.6
| |||
| 5 | |||
| 6 | use Moo; | ||
| 7 | extends 'Bot::Cobalt::IRC::Event::Channel'; | ||
| 8 | |||
| 9 | has topic => ( | ||
| 10 | required => 1, | ||
| 11 | is => 'rw', | ||
| 12 | isa => Str, | ||
| 13 | ); | ||
| 14 | |||
| 15 | has stripped => ( | ||
| 16 | lazy => 1, | ||
| 17 | is => 'ro', | ||
| 18 | isa => Str, | ||
| 19 | default => sub { | ||
| 20 | strip_color( strip_formatting( $_[0]->topic ) ) | ||
| 21 | }, | ||
| 22 | ); | ||
| 23 | |||
| 24 | 1; | ||
| 25 | __END__ | ||