Skip to content

Commit

Permalink
[codingstd] add code, pod and copyrights to new examples
Browse files Browse the repository at this point in the history
  • Loading branch information
Reini Urban committed Sep 24, 2012
1 parent ed4baf0 commit 3346aea
Show file tree
Hide file tree
Showing 2 changed files with 70 additions and 0 deletions.
35 changes: 35 additions & 0 deletions examples/mime_base64/utf8_base64.pir
Original file line number Diff line number Diff line change
@@ -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'

Expand All @@ -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:
35 changes: 35 additions & 0 deletions examples/mime_base64/utf8_base64.pl
Original file line number Diff line number Diff line change
@@ -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);
Expand All @@ -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:

0 comments on commit 3346aea

Please sign in to comment.