diff options
Diffstat (limited to 'lib/Config/ClawsMail/PasswordStoreParser.pm')
-rw-r--r-- | lib/Config/ClawsMail/PasswordStoreParser.pm | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/lib/Config/ClawsMail/PasswordStoreParser.pm b/lib/Config/ClawsMail/PasswordStoreParser.pm new file mode 100644 index 0000000..fe76b1e --- /dev/null +++ b/lib/Config/ClawsMail/PasswordStoreParser.pm @@ -0,0 +1,21 @@ +package Config::ClawsMail::PasswordStoreParser; +use v5.26; +use strict; +use warnings; +# VERSION +use parent 'Config::INI::Reader'; +# ABSTRACT: Config::INI::Reader tweaked for passwordstorerc + +sub parse_section_header { + my ($head) = $_[1] =~ /^\s*\[\s*(.+?)\s*\]\s*$/ + or return; + $head =~ s{account:}{Account: }; + return $head; +} + +sub parse_value_assignment { + return ($1, $2) if $_[1] =~ /^\s*([^\s\pC]+?)\s+(.*?)\s*$/; + return; +} + +1; |