SlideShare ist ein Scribd-Unternehmen logo
1 von 18
Downloaden Sie, um offline zu lesen
Meta Moose
Tuesday, September 18, 12
About Me

                            Ynon Perek
                            me@ynonperek.com
                            This keynote is available at:
                            http://ynonperek.com




Tuesday, September 18, 12
Meta Who


                            Person                Keynote
                                       has many




Tuesday, September 18, 12
Meta Who

              Meta-Person                         Meta-Keynote


                            Person                   Keynote
                                       has many




Tuesday, September 18, 12
Meta Class


                            What can my class do ?
                            What does my class know ?




Tuesday, September 18, 12
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
Real Zombies...




Tuesday, September 18, 12
Useful Meta

                            MooseX::HasDefaults::RO
                            Assign a meta-role to every attribute
                            which adds:
                            is => ‘ro’
                            Uses _process_options



Tuesday, September 18, 12
Useful Meta

                            MooseX::FollowPBP
                            Automatically set reader and writer to
                            get_name and set_name




Tuesday, September 18, 12
Useful Meta

                            MooseX::Privacy
                            Private Methods Using
                            meta




Tuesday, September 18, 12
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
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
Meta Me
Tuesday, September 18, 12
What I Had

                       Quote      Video     Keynote




Tuesday, September 18, 12
What I Need

                       Quote       Video     Keynote



                     admin/        admin/    admin/
                      quote         video    keynote



Tuesday, September 18, 12
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
Q&A




Tuesday, September 18, 12
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

Weitere Àhnliche Inhalte

Mehr von Ynon Perek

Syllabus
SyllabusSyllabus
Syllabus
Ynon Perek
 
Mobile Devices
Mobile DevicesMobile Devices
Mobile Devices
Ynon Perek
 
Cryptography
CryptographyCryptography
Cryptography
Ynon Perek
 
Accessibility
AccessibilityAccessibility
Accessibility
Ynon Perek
 
Angularjs
AngularjsAngularjs
Angularjs
Ynon Perek
 
Js memory
Js memoryJs memory
Js memory
Ynon Perek
 

Mehr von Ynon Perek (20)

09 performance
09 performance09 performance
09 performance
 
Mobile Web Intro
Mobile Web IntroMobile Web Intro
Mobile Web Intro
 
Qt multi threads
Qt multi threadsQt multi threads
Qt multi threads
 
Vimperl
VimperlVimperl
Vimperl
 
Syllabus
SyllabusSyllabus
Syllabus
 
Mobile Devices
Mobile DevicesMobile Devices
Mobile Devices
 
Network
NetworkNetwork
Network
 
Architecture app
Architecture appArchitecture app
Architecture app
 
Cryptography
CryptographyCryptography
Cryptography
 
Unit Testing JavaScript Applications
Unit Testing JavaScript ApplicationsUnit Testing JavaScript Applications
Unit Testing JavaScript Applications
 
How to write easy-to-test JavaScript
How to write easy-to-test JavaScriptHow to write easy-to-test JavaScript
How to write easy-to-test JavaScript
 
Introduction to Selenium and Ruby
Introduction to Selenium and RubyIntroduction to Selenium and Ruby
Introduction to Selenium and Ruby
 
Introduction To Web Application Testing
Introduction To Web Application TestingIntroduction To Web Application Testing
Introduction To Web Application Testing
 
Accessibility
AccessibilityAccessibility
Accessibility
 
Angularjs
AngularjsAngularjs
Angularjs
 
Js memory
Js memoryJs memory
Js memory
 
Qt Design Patterns
Qt Design PatternsQt Design Patterns
Qt Design Patterns
 
Web Application Security
Web Application SecurityWeb Application Security
Web Application Security
 
JavaScript DOM Manipulations
JavaScript DOM ManipulationsJavaScript DOM Manipulations
JavaScript DOM Manipulations
 
Mongodb Intro
Mongodb IntroMongodb Intro
Mongodb Intro
 

KĂŒrzlich hochgeladen

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

KĂŒrzlich hochgeladen (20)

Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 

Metamoose

  • 2. About Me Ynon Perek me@ynonperek.com This keynote is available at: http://ynonperek.com Tuesday, September 18, 12
  • 3. Meta Who Person Keynote has many Tuesday, September 18, 12
  • 4. Meta Who Meta-Person Meta-Keynote Person Keynote has many Tuesday, September 18, 12
  • 5. Meta Class What can my class do ? What does my class know ? Tuesday, September 18, 12
  • 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
  • 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. Useful Meta MooseX::FollowPBP Automatically set reader and writer to get_name and set_name Tuesday, September 18, 12
  • 10. Useful Meta MooseX::Privacy Private Methods Using meta Tuesday, September 18, 12
  • 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. 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
  • 14. What I Had Quote Video Keynote Tuesday, September 18, 12
  • 15. What I Need Quote Video Keynote admin/ admin/ admin/ quote video keynote Tuesday, September 18, 12
  • 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
  • 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