Encode and decode HTML entities in Perl 6