<commit_before>#!/usr/bin/perl

package ResourcePool::Factory::Redis;
use strict;
use warnings;
use base qw(ResourcePool::Factory);
use ResourcePool::Resource::Redis;

our $VERSION = 1.0;

sub new {
	my $proto = shift;
	my $class = ref($proto) || $proto;
	my $self = $class->SUPER::new("Redis");
	my %args = @_;

	$self->{'args'} = \%args;

	bless($self, $class);
	return $self;
}

sub create_resource {
	my ($self) = @_;
	return ResourcePool::Resource::Redis->new(%{$self->{'args'}});
}

__END__

=head1 SYNOPSIS

ResourcePool::Factory::Redis provides a L<Redis|Redis> factory for L<ResourcePool|ResourcePool>.

=head1 METHODS

=over

=item new(%args)

Accepts the same arguments as L<Redis::new|Redis>.

=back

=head1 SEE ALSO

L<ResourcePool|ResourcePool> for detailed documentation and general information about<commit_msg>Add info() method to factory<commit_after>#!/usr/bin/perl

package ResourcePool::Factory::Redis;
use strict;
use warnings;
use base qw(ResourcePool::Factory);
use ResourcePool::Resource::Redis;

our $VERSION = 1.0;

sub new {
	my $proto = shift;
	my $class = ref($proto) || $proto;
	my $self = $class->SUPER::new("Redis");
	my %args = @_;

	$self->{'args'} = \%args;

	bless($self, $class);
	return $self;
}

sub create_resource {
	my $self = shift;
	return ResourcePool::Resource::Redis->new(%{$self->{'args'}});
}

sub info {
	return shift->{'args'}->{'server'};
}

__END__

=head1 SYNOPSIS

ResourcePool::Factory::Redis provides a L<Redis|Redis> factory for L<ResourcePool|ResourcePool>.

=head1 METHODS

=over

=item new(%args)

Accepts the same arguments as L<Redis::new|Redis>.

=back

=head1 SEE ALSO

L<ResourcePool|ResourcePool> for detailed documentation and general information about
{'fraction_non_alphanumeric': 0.16385822196397443, 'fraction_numerical': 0.005810575246949448, 'mean_word_length': 5.597701149425287, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5195747', 'n_tokens_mistral': 633, 'n_tokens_neox': 612, 'n_words': 156}