about summary refs log tree commit homepage
path: root/lib/PublicInbox/MboxReader.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/PublicInbox/MboxReader.pm')
-rw-r--r--lib/PublicInbox/MboxReader.pm5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/PublicInbox/MboxReader.pm b/lib/PublicInbox/MboxReader.pm
index f93c2ec6..6302d1fa 100644
--- a/lib/PublicInbox/MboxReader.pm
+++ b/lib/PublicInbox/MboxReader.pm
@@ -133,4 +133,9 @@ sub mboxcl2 {
 
 sub new { bless \(my $x), __PACKAGE__ }
 
+sub reads {
+        my $ifmt = $_[-1];
+        $ifmt =~ /\Ambox(?:rd|cl|cl2|o)\z/ ? __PACKAGE__->can($ifmt) : undef
+}
+
 1;