Successfully reported this slideshow.

More Related Content

Related Books

Free with a 14 day trial from Scribd

See all

Related Audiobooks

Free with a 14 day trial from Scribd

See all

Metamoose

  1. 1. Meta Moose Tuesday, September 18, 12
  2. 2. About Me Ynon Perek me@ynonperek.com This keynote is available at: http://ynonperek.com Tuesday, September 18, 12
  3. 3. Meta Who Person Keynote has many Tuesday, September 18, 12
  4. 4. Meta Who Meta-Person Meta-Keynote Person Keynote has many Tuesday, September 18, 12
  5. 5. Meta Class What can my class do ? What does my class know ? Tuesday, September 18, 12
  6. 6. Meta Zombie package main; my $z = Zombie->new; while (chomp ( my $that = <> ) ) { my $m = Zombie->meta->find_method_by_name("eat_${that}"); $m->execute($z) if $m; } Tuesday, September 18, 12
  7. 7. Real Zombies... Tuesday, September 18, 12
  8. 8. Useful Meta MooseX::HasDefaults::RO Assign a meta-role to every attribute which adds: is => ‘ro’ Uses _process_options Tuesday, September 18, 12
  9. 9. Useful Meta MooseX::FollowPBP Automatically set reader and writer to get_name and set_name Tuesday, September 18, 12
  10. 10. Useful Meta MooseX::Privacy Private Methods Using meta Tuesday, September 18, 12
  11. 11. MooseX::Privacy use MooseX::Privacy; has config => ( is => 'rw', isa => 'Some::Config', traits => [qw/Private/], ); private_method foo => sub { return 23; }; Tuesday, September 18, 12
  12. 12. A few more package MyApp; use MooseX::Singleton; MooseX::Singleton package main; MooseX::YAML my $instance = MyApp->instance; my $same = MyApp->instance; Tuesday, September 18, 12
  13. 13. Meta Me Tuesday, September 18, 12
  14. 14. What I Had Quote Video Keynote Tuesday, September 18, 12
  15. 15. What I Need Quote Video Keynote admin/ admin/ admin/ quote video keynote Tuesday, September 18, 12
  16. 16. The Meta Way has 'name', isa => 'Str', required => 1, in_db => 1, form_opts => { type => 'text_field'}; has 'description', isa => 'Str', required => 1, in_db => 1, form_opts => { type => 'textarea_field' }; has 'url', isa => 'Str', required => 1, in_db => 1, form_opts => { type => 'text_field'}; has 'category', isa => 'Str', default => '', in_db => 1, form_opts => { type => 'select_field', options => YPCourse::Category->get_categories, }; Tuesday, September 18, 12
  17. 17. Q&A Tuesday, September 18, 12
  18. 18. Photos From zombies (slide 7): http://www.flickr.com/ photos/cwsteeds/4701084069/ gate (slide 10): http:// www.photoxpress.com/stock-photos/rust/ chains/lock/2544705 everything else: http://123rf.com Tuesday, September 18, 12

×