Wednesday, August 23, 2006

A Couple of Smerl Updates

I added a few new features to Smerl earlier today.




  • smerl:extend/2 now injects the parent/0 function, which returns the parent module's name, into the child module. This allows explicitly calling parent functions from the child module. (Using smerl:for_module/1, the child can also mutate its own parent in runtime, which puts an interesting twist on family relationships :-) )
  • smerl:to_src/1 returns the pretty-printed source code for the MetaMod object.

  • smerl:to_src/2 writes the pretty-printed source code for the MetaMod object into a file.



Enjoy!

No comments: