summaryrefslogtreecommitdiff
path: root/_posts/2009-06-30-private-and-protected-methods-with-moose.md
diff options
context:
space:
mode:
authorFranck Cuny <franck.cuny@gmail.com>2013-12-10 21:03:11 -0800
committerFranck Cuny <franck.cuny@gmail.com>2013-12-10 21:03:11 -0800
commit762d9da255862a0ade58a36f67098d1ceef1bcce (patch)
treee159548d5b9bcd041946f6d5d31b958c04135826 /_posts/2009-06-30-private-and-protected-methods-with-moose.md
parentCleanup the index (remove whitespace) (diff)
downloadlumberjaph-762d9da255862a0ade58a36f67098d1ceef1bcce.tar.gz
Add some links to bitbucket.
Diffstat (limited to '_posts/2009-06-30-private-and-protected-methods-with-moose.md')
-rw-r--r--_posts/2009-06-30-private-and-protected-methods-with-moose.md3
1 files changed, 1 insertions, 2 deletions
diff --git a/_posts/2009-06-30-private-and-protected-methods-with-moose.md b/_posts/2009-06-30-private-and-protected-methods-with-moose.md
index fe098f7..601010a 100644
--- a/_posts/2009-06-30-private-and-protected-methods-with-moose.md
+++ b/_posts/2009-06-30-private-and-protected-methods-with-moose.md
@@ -5,7 +5,7 @@ title: Private and protected methods with Moose
---
Yesterday, one of our interns asked me a question about private method in <a href="http://www.iinteractive.com/moose/">Moose</a>. I told him that for Moose as for Perl, there is no such things as private method. By convention, methods prefixed with '_' are considered private.
-But I was curious to see if it would be something complicated to implement in Moose. First, I've started to look at how the 'augment' keyword is done. I've then hacked Moose directly to add the private keyword. After asking advice to <a href="http://blog.woobling.org/">nothingmuch</a>, he recommended me that I implement this in a MooseX::* module instead. The result is <a href="http://github.com/franckcuny/MooseX--MethodPrivate/tree/master">here</a>.
+But I was curious to see if it would be something complicated to implement in Moose. First, I've started to look at how the 'augment' keyword is done. I've then hacked Moose directly to add the private keyword. After asking advice to <a href="http://blog.woobling.org/">nothingmuch</a>, he recommended me that I implement this in a MooseX::* module instead. The result is <a href="https://bitbucket.org/franckcuny/moosex-methodprivate">here</a>.
From the synopsis, MooseX::MethodPrivate do:
@@ -45,4 +45,3 @@ done was this:
{% endhighlight %}
and write the `private` and `protected` sub. I'm sure there is some stuff I can do to improve this, but for a first test, I'm happy with the result and still amazed how easy it was to add this two keywords.
-