File: Tab.pm

package info (click to toggle)
libtext-recordparser-perl 1.6.5-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 440 kB
  • sloc: perl: 3,351; makefile: 4
file content (73 lines) | stat: -rw-r--r-- 1,489 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
package Text::RecordParser::Tab;

use strict;
use warnings;
use version;

use base qw( Text::RecordParser );

our $VERSION = version->new('1.4.0');

# ----------------------------------------------------------------
sub new {
    my $class = shift;
    my $self  = $class->SUPER::new( @_ );

    $self->field_separator("\t");

    return $self;
}

1;

__END__

# ----------------------------------------------------------------

=pod

=head1 NAME

Text::RecordParser::Tab - read tab-delimited files

=head1 SYNOPSIS

  use Text::RecordParser::Tab;

=head1 DESCRIPTION

This module is a shortcut for getting a tab-delimited parser.

=head2 new

Call "new" as normal but without worrying about "field_separator" or "fs."

Because this:

  my $p = Text::RecordParser::Tab->new($file);

Is easier to type than this

  my $p = Text::RecordParser->new( 
      filename        => $file,
      field_separator => "\t",
  );

=head1 AUTHOR

Ken Youens-Clark E<lt>kclark@cpan.orgE<gt>

=head1 LICENSE AND COPYRIGHT

Copyright (C) 2006-10 Ken Youens-Clark.  All rights reserved.

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2.

This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
General Public License for more details.

=cut