Acme-Test-Pr0n

 view release on metacpan or  search on metacpan

Pr0n.pm  view on Meta::CPAN

	 my $class = ref($proto) || $proto;
	 my $self = {};
	 bless($self,$class);

	 croak "File not supplied" unless defined $conf->{'filename'};
	 croak "Could not read $conf->{filename}" unless -r $conf->{'filename'};

	 $self->{'filename'} = $conf->{'filename'};

	 # should use IO::File or something
	 local undef $/;
	 open(FH,$self->{'filename'}) or croak("Could not open file $!");
	 $self->{'file'} = <FH>;
	 close(FH);

	 return $self;
}

sub DESTROY{}

sub AUTOLOAD {
	my $self = shift;
	my $flags = shift || undef;
	my $name = $AUTOLOAD;
	$name =~ s/.*://;

	my $clean_string; # store file with all other chars removed
	my $num;

	if($flags && $flags eq 'i') {
 		($clean_string = $self->{'file'}) =~ s/([^$name]+)//gi;
		if($clean_string) {
			$num = ($clean_string =~ s/$name/x/gi);



( run in 1.979 second using v1.01-cache-2.11-cpan-d80b1682f3f )