Skip to content

Instantly share code, notes, and snippets.

@Woody2143
Created February 1, 2011 02:22
Show Gist options
  • Save Woody2143/805297 to your computer and use it in GitHub Desktop.
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
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