GSoC/GCI Archive
Google Code-in 2011 Parrot Foundation

Deduplicate methods in FileHandle

completed by: Aleksandar

mentors: Andrew Whitworth

Task Description

The FileHandle PMC in Parrot has two methods that are almost identical: print and puts. We do not need both. Remove the puts method from the FileHandle PMC (src/pmc/filehandle.pmc). Add the return value to the print method. Replace all uses of the puts method in the test suite and runtime library (runtime/parrot/*). Update any documentation that references the puts method of FileHandle (src/docs/*).

Steps To Complete This Task

  1. Create a fork of parrot.git on
  2. Perform all the necessary code and/or documentation changes
  3. Build parrot and run it's test suite (make fulltest) to verify that things still work
  4. You can also submit a smoke report with "make smoke", but that is optional. This requires installing a few Perl modules from CPAN.
  5. Create a Github pull request (button on the upper right of your fork) to have your changes incorporated into the master repository


  1. Having methods that do the same thing is confusing and wasteful. Removing duplicated code makes things less confusing and easier to maintain. It gives us a smaller interface necessary to implement for subclasses.


  1. C Programming Language

Additional Links