File: UpperText.pm

package info (click to toggle)
libcode-tidyall-perl 0.83~ds-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,036 kB
  • sloc: perl: 5,240; lisp: 47; makefile: 2; sh: 1
file content (16 lines) | stat: -rw-r--r-- 271 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
package TestHelper::Plugin::UpperText;

use Moo;
extends 'Code::TidyAll::Plugin';

sub transform_source {
    my ( $self, $source ) = @_;
    if ( $source =~ /^[A-Z]*$/mi ) {
        return uc($source);
    }
    else {
        die "non-alpha content found";
    }
}

1;