Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

plenv plugin #7

Open
dolmen opened this issue Jul 2, 2014 · 1 comment
Open

plenv plugin #7

dolmen opened this issue Jul 2, 2014 · 1 comment

Comments

@dolmen
Copy link
Owner

dolmen commented Jul 2, 2014

Report the current perl version set by plenv.

Design idea: use Unicode superscripts and subscripts.

$ perl -C -E 'say "perl 5.10.1: \x{2075}10\x{2081}"'
perl 5.10.1: ⁵10₁
@dolmen
Copy link
Owner Author

dolmen commented May 4, 2016

sub pack_perl5_version
{
    my $v = shift;
    # Replace "5." with '⁵'
    substr($v, 0, 2, "\N{U+2075}");
    # Replace minor with subscript digit
    substr($v, -2, 2, chr(0x2080+substr($v, -1)));
    $v
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant