diff options
author | Eric Wong <e@80x24.org> | 2021-10-16 01:00:52 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2021-10-16 01:42:47 +0000 |
commit | 879547527204b878b80804c2f19c6ef71458194e (patch) | |
tree | 82db8884c66d6d86983dc7721e59b4db33fcb17a /lib/PublicInbox/Smsg.pm | |
parent | 299b40d252cf4d4db6fa29ad18cb78777f1f55fc (diff) | |
download | public-inbox-879547527204b878b80804c2f19c6ef71458194e.tar.gz |
smsg: add ->oidbin method
This makes some of our code less noisy by reducing the amount of pack('H*', ...) use.
Diffstat (limited to 'lib/PublicInbox/Smsg.pm')
-rw-r--r-- | lib/PublicInbox/Smsg.pm | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/PublicInbox/Smsg.pm b/lib/PublicInbox/Smsg.pm index a2f54507..260ce6bb 100644 --- a/lib/PublicInbox/Smsg.pm +++ b/lib/PublicInbox/Smsg.pm @@ -9,13 +9,15 @@ # large threads in our WWW UI and the NNTP range responses. package PublicInbox::Smsg; use strict; -use warnings; -use base qw(Exporter); +use v5.10.1; +use parent qw(Exporter); our @EXPORT_OK = qw(subject_normalized); use PublicInbox::MID qw(mids references); use PublicInbox::Address; use PublicInbox::MsgTime qw(msg_timestamp msg_datestamp); +sub oidbin { pack('H*', $_[0]->{blob}) } + sub to_doc_data { my ($self) = @_; join("\n", |