Perl6 Object Oriented Cookbook (v0.2.1)  
Section 6: Context and Transformation  
 
Recipe 6.4: Using Transformations for Formatting
Last Updated: Sep 8, 2003
Status: Draft
      Previous Page   Next Page

How important is this problem to you?
  (Login to Vote)
5.00 Rating, 1 Vote  

How acceptable is the proposed solution?
  (Login to Vote)
0.00 Rating, 0 Votes  

Problem:  

You want to make sure a number, string, or other data value is formatted consistently when output.

Solution:  

Create a simple class to do the formatting, and give it the appropriate from constructors:

Discussion:


Log In to Comment


Login / Edit User Info -- Copyright © 2002 Cognitivity -- Previous Page   Next Page