Created
February 1, 2011 02:22
-
-
Save Woody2143/805297 to your computer and use it in GitHub Desktop.
test module. Rough example: running CGIIndex->search would return a list of files contained in $date.txt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package CDRIndex; | |
use strict; | |
use warnings; | |
sub new { | |
my ($class, %args) = @_; | |
bless \%args, $class; | |
} | |
sub ani { | |
my $self = shift; | |
$self->{ani} = shift if @_; | |
$self->{ani}; | |
} | |
sub date { | |
my $self = shift; | |
$self->{date} = shift if @_; | |
$self->{date}; | |
} | |
sub search { | |
my $self = shift; | |
my $command = '/bin/grep'; | |
my $ani = $self->ani(); | |
my $date = $self->date(); | |
qx/$command $ani $date.txt/; | |
} | |
1; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment