Created
July 16, 2013 06:04
-
-
Save axtl/6006157 to your computer and use it in GitHub Desktop.
Thin CLI wrapper around [Email::Enkoder](https://github.com/wchristian/email-enkoder).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env perl | |
| use strict; | |
| use warnings; | |
| use Email::Enkoder; | |
| my $email = $ARGV[0]; | |
| my $text = $ARGV[1] ? $ARGV[1] : "email"; | |
| my $subject = $ARGV[2] ? $ARGV[2] : ""; | |
| chomp ($email); | |
| chomp ($text); | |
| chomp ($subject); | |
| my $enkoded = Email::Enkoder::enkode_mail( | |
| $email, | |
| { | |
| max_length => 1, | |
| # enkoders => $enkoders, | |
| link_text => qq|$text|, | |
| link_attributes => qq|title="$email" class="$email"|, | |
| subject => $subject | |
| } | |
| ); | |
| print $enkoded; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment