File: Util.pm

package info (click to toggle)
libmodule-build-pluggable-perl 0.10-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 192 kB
  • sloc: perl: 434; makefile: 2
file content (18 lines) | stat: -rw-r--r-- 265 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
package t::Util;
use strict;
use warnings;
use utf8;

use parent qw(Exporter);

our @EXPORT = qw(spew);

sub spew {
    my ($fname, $content) = @_;
    open my $fh, '>', $fname
        or die "Cannot open '$fname' for writing: $!";
    print {$fh} $content;
}

1;