From 92d3823abde6275c925814bc220e5cd88c624d2c Mon Sep 17 00:00:00 2001 From: "Michael G. Schwern" Date: Fri, 25 May 2012 13:22:19 -0700 Subject: [PATCH] Un-hard-code the event storage class. Not documenting it just yet, not sure I want to expose it. --- lib/TB2/History.pm | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/TB2/History.pm b/lib/TB2/History.pm index a16676082..9a7a3a90f 100644 --- a/lib/TB2/History.pm +++ b/lib/TB2/History.pm @@ -91,12 +91,17 @@ An array ref of all events seen. =cut +sub event_storage_class { + return "TB2::History::EventStorage"; +} + has event_storage => is => 'ro', isa => 'TB2::History::EventStorage', default => sub { - $_[0]->load("TB2::History::EventStorage"); - return TB2::History::EventStorage->new; + my $storage_class = $_[0]->event_storage_class; + $_[0]->load($storage_class); + return $storage_class->new; }; sub events {