Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[codingstd] add code, pod and copyrights to new examples

  • Loading branch information...
commit 92f4de40230b86a161af99afb03853cca119651c 1 parent ee7d8a5
@rurban rurban authored
View
35 examples/mime_base64/utf8_base64.pir
@@ -1,3 +1,22 @@
+#!./parrot
+# Copyright (C) 2012, Parrot Foundation.
+
+=head1 NAME
+
+examples/mime_base64/utf_base64.pir - Conformant MIME::Base64 utf8 handling
+
+=head1 SYNOPSIS
+
+ % ./parrot examples/mime_base64/utf_base64.pir
+
+=head1 DESCRIPTION
+
+Compare conformant coreutils C<base64> and F<examples/mime_base64/utf_base64.pl>
+against ours.
+See L<https://github.com/parrot/parrot/issues/814>
+
+=cut
+
.sub main :main
load_bytecode 'MIME/Base64.pbc'
@@ -20,3 +39,19 @@
say result_encode
.end
+
+=head1 AUTHOR
+
+ronaldxs
+
+=head1 SEE ALSO
+
+F<examples/mime_base64/utf8_base64.pl>,
+
+=cut
+
+# Local Variables:
+# mode: pir
+# fill-column: 100
+# End:
+# vim: expandtab shiftwidth=4 ft=pir:
View
35 examples/mime_base64/utf8_base64.pl
@@ -1,4 +1,22 @@
#! /usr/bin/perl
+# Copyright (C) 2012, Parrot Foundation.
+
+=head1 NAME
+
+examples/mime_base64/utf_base64.pl - Conformant MIME::Base64 utf8 handling
+
+=head1 SYNOPSIS
+
+ % perl examples/mime_base64/utf_base64.pl
+
+=head1 DESCRIPTION
+
+Compare conformant coreutils C<base64> and F<examples/mime_base64/utf_base64.pl>
+against parrots.
+See L<https://github.com/parrot/parrot/issues/814>
+
+=cut
+
use strict;
use MIME::Base64 qw(encode_base64 decode_base64);
use Encode qw(encode);
@@ -15,3 +33,20 @@
print "result: $encoded\n"; # 342 200 276
print "decode: ",decode_base64("4oC+"),"\n";
+
+=head1 AUTHOR
+
+ronaldxs
+
+=head1 SEE ALSO
+
+F<examples/mime_base64/utf8_base64.pir>,
+
+=cut
+
+# Local Variables:
+# mode: cperl
+# cperl-indent-level: 4
+# fill-column: 100
+# End:
+# vim: expandtab shiftwidth=4:
Please sign in to comment.
Something went wrong with that request. Please try again.