This is the Moose talk I gave at YAPC::NA 2012.
It included a practical example of a Moose objects code, a simple app called Comican. The code is not available online. If you want it, just email me (sawyer ATT cpan DOTT org).
The document provides an overview of modern Perl features including:
- Using say() instead of print for output
- Defined-or operator //
- switch/given statement for conditionals
- Smart matching with ~~ operator
- state keyword for static variables
- New regex features like named capture buffers
- Object oriented programming with Moose
- Defining classes, attributes, types and inheritance with Moose
- Exception handling with TryCatch and autodie
- Best practices for coding style, layout, testing and more
Slides of the presentation I gave for Perl NYC Meetup 23 April 2012 (http://www.meetup.com/The-New-York-Perl-Meetup-Group/events/59990662/)
The document discusses how the author evolved the Perlanet software by refactoring it to use Moose and a trait-based architecture. Some key points:
- Perlanet started as a monolithic module but was hard to customize or add new features to.
- The author used Moose to "slash and burn" the code into a more object-oriented and overridable structure using traits instead of large subclasses.
- Traits were used to extract specific behaviors like HTML scrubbing, YAML configuration, etc. into reusable modules.
- This allowed Perlanet to become a "hollow shell" that loads functionality via traits, making it easier to customize and extend.
- The
This document introduces object oriented programming in Perl using Moose. It discusses what objects are, how they are commonly created with Moose, and how Moose handles attributes and delegation. Moose provides features like type constraints and immutability out of the box to reduce code and improve performance compared to implementing object oriented code without Moose. The document also covers testing objects and using roles to take on features from multiple packages.
Moose is an object framework for Perl 5 that simplifies object-oriented programming. It allows classes to be defined declaratively using attributes like 'has' and inheritance is implemented with 'extends'. Attributes can have types, defaults, and delegated accessors. Roles provide reusable traits and are composed into classes using 'with'. Moose supports features like multiple inheritance, method overriding, and required interface methods.
Moose is an object framework for Perl that provides:
1) Full-featured object-oriented programming with attributes, inheritance, roles, and hooks
2) Powerful attribute features like types, defaults, builders, and more
3) A clean and stable API for defining and working with objects
This document provides an introduction and overview of Moose, a modern object framework for Perl 5. It begins with background on the author and a brief history of object oriented programming in Perl 5. It then explains what Moose is, including that it handles object overhead, allows for introspection, and is used in production software. Examples are provided of basic class creation and usage with Moose as well as more advanced features like attributes, types, subclassing, roles, method modifiers, and introspection. The benefits of Moose are summarized as writing less code and avoiding implementation details to have a better object model.
CoffeeScript is a programming language that compiles to JavaScript. It adds syntactic sugar that makes JavaScript cleaner and adds features inspired by Python and Ruby. Key features include cleaner syntax for functions, objects, conditionals, loops, and classes. CoffeeScript code compiles directly to equivalent JavaScript code, so it can be used anywhere JavaScript is used like web browsers and Node.js. To use CoffeeScript, install the CoffeeScript compiler and use it to compile CoffeeScript files to JavaScript for use in projects.
CoffeeScript is a little language that compiles to JavaScript. It repairs confusing aspects of JavaScript while keeping its flexibility. The document discusses CoffeeScript types like numbers, strings, booleans, objects and functions. It also covers CoffeeScript concepts like variables, operators, expressions, statements, control flow, arrays, objects, loops, classes, inheritance and functions. CoffeeScript aims to expose the good parts of JavaScript in a simpler way.
The document discusses CoffeeScript, a programming language that compiles to JavaScript. It was designed to have cleaner syntax than JavaScript and be easier to read and write. CoffeeScript code compiles directly to equivalent JavaScript code. Using CoffeeScript can help developers write less code that is more readable and maintainable while still being able to use existing JavaScript libraries. The document provides examples of CoffeeScript code and the equivalent JavaScript output. It also discusses how to use CoffeeScript with Ruby on Rails projects by adding the Barista gem.
This document provides an introduction and overview of DBIx::Class, an ORM (object relational mapper) for Perl. It discusses setting up tables for an authors and books example database, and performing CRUD (create, read, update, delete) operations both manually using SQL and using DBIx::Class. It also covers creating models with Schema::Loader, debugging, overloading result and result set classes, and inflating/deflating columns.
If your not using an ORM (object relational mapper) and are still writing SQL by hand, here's what you need to know.
An introduction into DBIx::Class and some of the concepts and goodies you should be aware off.
The document discusses strategies for writing friendly libraries in CodeIgniter, including making libraries testable, reducing coupling, versioning, documentation, adaptability, and namespacing. It also provides tips for writing libraries such as using configuration, helpers, language files, and not restricting yourself.
This document provides an introduction and overview of using MongoDB and the Doctrine MongoDB ODM with code examples. It demonstrates basic MongoDB operations like saving, finding, and updating documents. It then shows how the Doctrine MongoDB ODM can be used to map documents to PHP objects to work with them in an object-oriented way, including associations, queries, and lifecycle callbacks. The presenter encourages interested developers to contact them about open positions at OpenSky.
Puppet Camp Paris 2015: Power of Puppet 4 (Beginner) Puppet
Puppet 4 introduces several new features and changes including improved performance, scalability, measurability and flexibility. It features a new Puppet Server based on Clojure and Trapperkeeper, packaging changes, improved environment handling, r10k for managing environments from git, new language features like lambdas and EPP templates, improved data binding and overriding, stronger typing support, and various deprecations around node inheritance, hyphens in names, and other changes. Upgrading requires testing modules against the new version and addressing any compatibility issues.
The document discusses new features and changes in Puppet 4, including Puppet Server running on JVM, packaging improvements, environment configuration options, language features like lambdas and HEREDOC support, type validation, and deprecations like node inheritance and hyphens in names. It highlights four key powers of Puppet 4: performance, scalability, measurability, and flexibility in dealing with complex data types natively. Upgrading to Puppet 4 requires changes to comply with deprecations and testing to ensure compatibility.
Perl provides many powerful features and modules that allow developers to customize and extend the language. Some popular modules include Moose for object-oriented programming, TryCatch for exception handling inspired by Perl 6, and P5.10 features that backport Perl 6 functionality. While useful, some features like autoboxing and state variables could introduce subtle bugs if misused. Overall, Perl's extensibility makes it a very flexible language that can be adapted to many different use cases.
My Beginners Perl tutorial, much abbreviated and as presented at the London Perl Workshop on Dec 1st 2007.
Also includes the section on Regular Expressions that we didn't have time for on the day.
A helper to make the life of Wordpress developers easier.
This helper can be used to quickly register Custom Post Types, Taxonomies, Meta Boxes, Menu Pages and Sidebars within your Wordpress projects. Please comment, review, watch, fork and report bugs.
My talk from the pupet devops conference Berlin 2014 (http://code-your-config.com/). A low level tour of some terrible terrible puppet code, with advice on how to do it better (including showing off the awesome new each() construct you get in puppet 3.2)
Perl, a cross-platform, open-source computer programming language used widely in the commercial and private computing sectors. Perl is a favourite among Web developers for its flexible, continually evolving text-processing and problem-solving capabilities.
The document discusses Node.js and compares it to other technologies like CakePHP. It provides an overview of Node.js including its event-driven and asynchronous model, key features like the V8 engine and packages/modules, and frameworks like Express. It then demonstrates building a sample messaging application with a JSON API using both CakePHP and Node.js.
The document describes an advanced Perl techniques training course that covers new features in Perl 5.10, dates and times using the DateTime module, testing and benchmarking code, and accessing databases. The one-day course will move quickly and cover dates/times, testing, databases, profiling, object-oriented programming with Moose, templates, and MVC frameworks. Resources from the training will be available online.
This document introduces best practices for writing clean and readable Perl code. It provides examples of poorly formatted code and discusses improvements like using strict and warnings, consistent indentation, descriptive variable names, and limiting line length to 80 characters. The examples demonstrate separating code into logical blocks, spacing around operators, and vertical alignment to improve readability. Adopting these styles and standards helps code be more maintainable as projects evolve over time.
The document appears to be a presentation about Moose, an object framework for Perl 5. It begins by discussing how Moose simplifies object-oriented programming in Perl by providing features like defining classes and attributes in a cleaner way compared to native Perl 5. It emphasizes that Moose is just Perl code under the hood and not magic. It then covers object-oriented programming fundamentals like state, behavior, and code reuse before demonstrating a basic Employee class.
This document provides an introduction and overview of Moose, a modern object framework for Perl 5. It begins with background on the author and a brief history of object oriented programming in Perl 5. It then explains what Moose is, including that it handles object overhead, allows for introspection, and is used in production software. Examples are provided of basic class creation and usage with Moose as well as more advanced features like attributes, types, subclassing, roles, method modifiers, and introspection. The benefits of Moose are summarized as writing less code and avoiding implementation details to have a better object model.
CoffeeScript is a programming language that compiles to JavaScript. It adds syntactic sugar that makes JavaScript cleaner and adds features inspired by Python and Ruby. Key features include cleaner syntax for functions, objects, conditionals, loops, and classes. CoffeeScript code compiles directly to equivalent JavaScript code, so it can be used anywhere JavaScript is used like web browsers and Node.js. To use CoffeeScript, install the CoffeeScript compiler and use it to compile CoffeeScript files to JavaScript for use in projects.
CoffeeScript is a little language that compiles to JavaScript. It repairs confusing aspects of JavaScript while keeping its flexibility. The document discusses CoffeeScript types like numbers, strings, booleans, objects and functions. It also covers CoffeeScript concepts like variables, operators, expressions, statements, control flow, arrays, objects, loops, classes, inheritance and functions. CoffeeScript aims to expose the good parts of JavaScript in a simpler way.
The document discusses CoffeeScript, a programming language that compiles to JavaScript. It was designed to have cleaner syntax than JavaScript and be easier to read and write. CoffeeScript code compiles directly to equivalent JavaScript code. Using CoffeeScript can help developers write less code that is more readable and maintainable while still being able to use existing JavaScript libraries. The document provides examples of CoffeeScript code and the equivalent JavaScript output. It also discusses how to use CoffeeScript with Ruby on Rails projects by adding the Barista gem.
This document provides an introduction and overview of DBIx::Class, an ORM (object relational mapper) for Perl. It discusses setting up tables for an authors and books example database, and performing CRUD (create, read, update, delete) operations both manually using SQL and using DBIx::Class. It also covers creating models with Schema::Loader, debugging, overloading result and result set classes, and inflating/deflating columns.
If your not using an ORM (object relational mapper) and are still writing SQL by hand, here's what you need to know.
An introduction into DBIx::Class and some of the concepts and goodies you should be aware off.
The document discusses strategies for writing friendly libraries in CodeIgniter, including making libraries testable, reducing coupling, versioning, documentation, adaptability, and namespacing. It also provides tips for writing libraries such as using configuration, helpers, language files, and not restricting yourself.
This document provides an introduction and overview of using MongoDB and the Doctrine MongoDB ODM with code examples. It demonstrates basic MongoDB operations like saving, finding, and updating documents. It then shows how the Doctrine MongoDB ODM can be used to map documents to PHP objects to work with them in an object-oriented way, including associations, queries, and lifecycle callbacks. The presenter encourages interested developers to contact them about open positions at OpenSky.
Puppet Camp Paris 2015: Power of Puppet 4 (Beginner) Puppet
Puppet 4 introduces several new features and changes including improved performance, scalability, measurability and flexibility. It features a new Puppet Server based on Clojure and Trapperkeeper, packaging changes, improved environment handling, r10k for managing environments from git, new language features like lambdas and EPP templates, improved data binding and overriding, stronger typing support, and various deprecations around node inheritance, hyphens in names, and other changes. Upgrading requires testing modules against the new version and addressing any compatibility issues.
The document discusses new features and changes in Puppet 4, including Puppet Server running on JVM, packaging improvements, environment configuration options, language features like lambdas and HEREDOC support, type validation, and deprecations like node inheritance and hyphens in names. It highlights four key powers of Puppet 4: performance, scalability, measurability, and flexibility in dealing with complex data types natively. Upgrading to Puppet 4 requires changes to comply with deprecations and testing to ensure compatibility.
Perl provides many powerful features and modules that allow developers to customize and extend the language. Some popular modules include Moose for object-oriented programming, TryCatch for exception handling inspired by Perl 6, and P5.10 features that backport Perl 6 functionality. While useful, some features like autoboxing and state variables could introduce subtle bugs if misused. Overall, Perl's extensibility makes it a very flexible language that can be adapted to many different use cases.
My Beginners Perl tutorial, much abbreviated and as presented at the London Perl Workshop on Dec 1st 2007.
Also includes the section on Regular Expressions that we didn't have time for on the day.
A helper to make the life of Wordpress developers easier.
This helper can be used to quickly register Custom Post Types, Taxonomies, Meta Boxes, Menu Pages and Sidebars within your Wordpress projects. Please comment, review, watch, fork and report bugs.
My talk from the pupet devops conference Berlin 2014 (http://code-your-config.com/). A low level tour of some terrible terrible puppet code, with advice on how to do it better (including showing off the awesome new each() construct you get in puppet 3.2)
Perl, a cross-platform, open-source computer programming language used widely in the commercial and private computing sectors. Perl is a favourite among Web developers for its flexible, continually evolving text-processing and problem-solving capabilities.
The document discusses Node.js and compares it to other technologies like CakePHP. It provides an overview of Node.js including its event-driven and asynchronous model, key features like the V8 engine and packages/modules, and frameworks like Express. It then demonstrates building a sample messaging application with a JSON API using both CakePHP and Node.js.
The document describes an advanced Perl techniques training course that covers new features in Perl 5.10, dates and times using the DateTime module, testing and benchmarking code, and accessing databases. The one-day course will move quickly and cover dates/times, testing, databases, profiling, object-oriented programming with Moose, templates, and MVC frameworks. Resources from the training will be available online.
This document introduces best practices for writing clean and readable Perl code. It provides examples of poorly formatted code and discusses improvements like using strict and warnings, consistent indentation, descriptive variable names, and limiting line length to 80 characters. The examples demonstrate separating code into logical blocks, spacing around operators, and vertical alignment to improve readability. Adopting these styles and standards helps code be more maintainable as projects evolve over time.
The document appears to be a presentation about Moose, an object framework for Perl 5. It begins by discussing how Moose simplifies object-oriented programming in Perl by providing features like defining classes and attributes in a cleaner way compared to native Perl 5. It emphasizes that Moose is just Perl code under the hood and not magic. It then covers object-oriented programming fundamentals like state, behavior, and code reuse before demonstrating a basic Employee class.
Object Oriented got a lot easier since Moose came around.
This keynote is a one-day advanced Moose workshop covering (almost) everything Moose has to offer perl developers
A software firewall inspects incoming and outgoing network packets to determine whether they should be allowed or blocked based on configured firewall rules. The document describes a training report on implementing a graphical user interface (GUI) version of iptables using Perl and the dialog tool. Key features of the SYS firewall implemented include authorizing users, limiting service access, filtering packets, network address translation (NAT), and masquerading. The GUI allows configuring and customizing firewall rules to block ping requests, drop all policies, and implement SNAT, masquerading, and DNAT.
The document discusses the modular structure of the Moose Perl object framework. It notes that Moose consists of over 50 modules that can be categorized into around 10 groups based on their functions. The document recommends using the NYTProf profiler to analyze which Moose modules and methods are most active in order to better understand its internal workings.
The document discusses Perl's MAGIC feature which allows special features to be associated with scalar values (SVs) via a linked list of MAGIC structures. MAGIC structures can store hooks for methods and managed data. It provides examples of how various Perl functions and modules use MAGIC, and recommendations for XS writers to properly handle MAGIC when interfacing with Perl from C code.
This document provides an overview of object-oriented programming concepts and Moose, a object system for Perl 5. It covers introducing OOP, the basics of classes, objects, methods and attributes. It then discusses Moose specifically, including declaring classes and attributes, subclasses, and best practices. The goal is to provide an introduction to OO programming in Perl using Moose.
Great Tools Heavily Used In Japan, You Don't Know.Junichi Ishida
The document discusses Japanese Perl developers who attended YAPC::EU 2015. It introduces many popular Perl modules created by Japanese developers, such as WebService::Simple for making web service requests, Riji for creating blogs, and GrowthForecast for visualizing metrics graphs. It encourages attendees to talk to the Japanese developers about their work or any questions. It emphasizes that Japanese developers prioritize speed and simplicity in their modules due to their culture of valuing efficiency.
This document discusses how Vim can improve productivity for Perl coding. It provides examples of using Vim motions and modes like Normal mode, Insert mode, and Visual mode to efficiently edit code. It also covers Vim features like syntax highlighting, custom syntax files, key mappings, and text objects that are useful for Perl. The document advocates that Vim is a powerful editor rather than an IDE and highlights how it can save significant time compared to less efficient editing methods.
“An investment in knowledge always pays the best interest.” – Benjamin Franklin. Here is a list of 10 books that I believe that every developer should read. Take a look.
Keynote presented at SDD (12th May 2015)
Somewhere in the heart of a development process, essential to the very being of a product's existence, are the people who write, consider and wrestle with code. What motivates and demotivates them? What are the intellectual challenges and rewards? What are the skills they have and need and cognitive biases and environment they work with and against?
This talk by the editor of 97 Things Every Programmer Should Know considers the act of programming and those who do it and want to get better at it, from the perspective of development process to craft, from architecture to code.
This document discusses Perl objects and object-oriented programming in Perl. It begins by explaining some of the problems with manipulating data without objects, such as needing to know exact key names and being unable to change key names or storage locations without updating all code. It then discusses what an object is and some benefits of using objects such as code organization, reducing repetition, and making code easier to read, share, test and maintain. The document goes on to explain object-oriented concepts like inheritance, encapsulation, and type checking. It provides examples of different object libraries for Perl like Moose, Moo, and Class::XSAccessor. It also discusses when it may not be appropriate to use objects, such as for performance-
The document describes a project to build a website called PerkyProfiler that retrieves user profile information from different services like GitHub, Flickr, and Twitter by taking URLs as input. It will use Perl and several Perl modules. The project will be built using the Catalyst web framework and Moose/MooseX for object-oriented programming. It describes using Moose roles, custom types, declarative class definitions, and functional programming techniques in Perl. The goal is to generate a unified user profile by combining data from different services for a given URL.
Lithium: The Framework for People Who Hate FrameworksNate Abele
This is the presentation was given at ConFoo on March 11th by Nate Abele and Joël Perras, and is an introduction to the architectural problems with other frameworks that Lithium was designed to address, and how it addresses them. It also introduces programming paradigms like functional and aspect-oriented programming which address issues that OOP doesn't account for.
Finally, the talk provides a quick overview of the innovative and unparalleled features that Lithium provides, including the data layer, which supports both relational and non-relational databases.
This document provides an overview of Moose, an object system for Perl:
1) Moose allows developers to combine data and functions into classes and objects. It provides features like attributes, accessors, constructors, inheritance, roles, and optimizations that improve performance.
2) Attributes define the data associated with a class and accessors provide read/write interfaces. Constructors initialize objects. Inheritance, roles, and modifiers extend functionality.
3) Moose provides a more robust and standardized way to write object-oriented Perl code compared to Perl's native object system. Over 2,200 modules on CPAN depend on Moose features.
Elastic::Model is a new framework to store your Moose objects, which uses ElasticSearch as a NoSQL document store and flexible search engine.
It is designed to make small beginnings simple, but to scale easily to Big Data requirements without needing to rearchitect your application. No job too big or small!
This talk will introduce Elastic::Model, demonstrate how to develop a simple application, introduce some more advanced techniques, and discuss how it uses ElasticSearch to scale.
https://github.com/clintongormley/Elastic-Model
Roles are an excellent object-oriented tool both for allomorphism and for
reuse.
Roles facilitate allomorphism by favoring "does this object do X" versus "is
this object a subclass of X". You often care more about capability than
inheritance. In a sense, roles encode types better than inheritance.
Roles also provide an excellent faculty for reuse. This effectively eliminates
multiple inheritance, which is often the only solution for sharing code between
unrelated classes.
Roles can combine with conflict detection. This eliminates accidental shadowing
of methods that is painful with multiple inheritance and mixins.
Parameterized roles (via MooseX::Role::Parameterized) improve the reusability
of roles by letting each consumer cater the role to its needs. This does
sacrifice some allomorphism, but there are ways to restore it.
The document discusses various techniques for extending and improving Perl, including both good and potentially evil techniques. It covers Perl modules that port Perl 6 features to Perl 5 like given/when switches and state variables. It also discusses techniques for runtime introspection and modification like PadWalker and source filters. The document advocates for continuing to extend Perl 5 with modern features to keep it relevant and powerful.
Puppet is an open source configuration management tool that can be used to automate the configuration and management of infrastructure and applications. It uses a client-server architecture and declarative language to define and enforce the desired state of systems. Other HashiCorp tools like Packer, Terraform, Vault and Nomad can integrate with Puppet for tasks like infrastructure provisioning, secrets management and workload orchestration. Bolt is a task orchestration tool from Puppet that can be used to automate operational tasks across infrastructure defined by tools like Terraform. Consul provides service discovery and configuration for the Puppet infrastructure.
Replacing "exec" with a type and providerDominic Cleal
Far too often we abuse the "exec" type, when what we really need is a simple provider that allows for more complex tests and exception handling. This talk will show how to change that enormous "exec" resource to a new type and provider, then return your manifests to a declarative config description.
Puppet is a tool that allows users to declaratively configure systems. It provides abstraction through defined resources like packages and files, ensures configurations are idempotent, and converges systems to the desired state declaratively rather than imperatively through scripts. Puppet code is organized into reusable modules and managed through version control. Modules should include tests, be validated with tools like puppet-lint, and tested in automated environments like Travis CI to ensure high quality.
Rapid Development with Ruby/JRuby and Railselliando dias
This document discusses Ruby and Rails development. It provides an overview of Ruby as a scripting language created by Yukihiro Matsumoto in 1993 with a focus on readability. Key aspects of Ruby covered include conventions, classes, symbols, closures, duck typing, and metaprogramming. The document also discusses how JRuby allows Java developers to use Ruby on the JVM and benefit from Ruby tools like Rails.
The document discusses object-oriented programming in Ruby. It introduces some key concepts in OOP like classes, objects, identity, state, and behavior. It also covers Ruby-specific paradigms like modules and mixins. Some common design patterns are mentioned like singleton, iterator, and decorator. The document provides examples to illustrate concepts like inheritance, polymorphism, and visibility in modules.
Ruby is a concise and readable programming language where everything is an object. It allows for terse yet readable code through features like optional semicolons and parentheses. Common tasks like working with arrays and hashes are easy in Ruby. The language also has tools and frameworks like Rails, RSpec, Rake, and Gems that make development fast and easy.
A linguagem de programação Ruby - Robson "Duda" Sejan Soares DornellesTchelinux
Sobre o palestrante: Formado na UFPel no início do ano corrente, trabalhou com desenvolvimento de hardware para TV digital durante a graduação. Entretanto, sempre foi apaixonado por belas linguagens de programação, e destas, Ruby é a que mais se destaca. Atualmente aguarda o mês de junho, quando começa a trabalhar na ThoughtWorks, em Porto Alegre.
This document provides an overview of the Ruby programming language. It discusses Ruby's clean and meaningful syntax, everything being an object, dynamic typing and duck typing, open classes, blocks, mixins, testing, standard library, and gems. Ruby aims to be productive and fun to use.
This document provides an introduction to jRuby, which allows Ruby code to be run on the Java Virtual Machine. It discusses the history and creator of Ruby, Yukihiro "Matz" Matsumoto, and his goals for the language. It then provides a primer on Ruby syntax including booleans, strings, numbers, arrays, hashes, symbols, and classes. It demonstrates how Ruby code can interact with Java code when using jRuby, such as calling Java classes and methods from Ruby. It also discusses metaprogramming in Ruby and how jRuby enables cross-platform GUI development using Java libraries.
This document provides an overview of DataMapper, an object-relational mapper (ORM) library for Ruby applications. It summarizes DataMapper's main features such as associations, migrations, database adapters, naming conventions, validations, custom types and stores. The document also provides examples of how to use DataMapper with different databases, import/export data, and validate models for specific contexts.
The document discusses dependency injection containers and configuration in frameworks. It provides examples of configuring services like mail transport and mailers using different approaches like procedural code, object-oriented code, and XML configuration. It also discusses managing configuration for different environments and making components more flexible through inheritance and customization.
Various coding styles I hate seeing. It's a rant, but a fun one. Uses Spiderman to help illustrate my angst.
This talk was originally given at Cluj.pm, on November 7th, 2013.
A talk about XS Fun, an easy-going tutorial to Perl XS:
https://github.com/xsawyerx/xs-fun
This talk was originally given at Cluj.pm, on November 7th, 2013.
This document discusses asynchronous programming and provides examples using various asynchronous programming models in Perl, including IO::Async, POE, and callbacks. It illustrates how asynchronous programming allows for control by other processes, asynchronous code, and event-driven programming. Examples show setting up asynchronous HTTP requests using IO::Async and running sessions and events in POE.
Our local state, my, my - Understanding Perl variablesxSawyer
This talk should explain the different ways to define Perl variables. What each one does and how they work. It will help you avoid problems with incorrect variable definition and to learn how to use variables in a smarter manner.
This was the last talk of a Tel Aviv Perl Mongers (TA.pm) group meeting.
Your first website in under a minute with DancerxSawyer
Learn how to write your first website using Perl and Dancer in under a minute!
This is a lightning talk given at a Tel Aviv Perl Mongers (TA.pm) group meeting.
This document introduces the Dancer web framework for Perl. It summarizes Dancer's key features, including its route-based and minimal design inspired by Sinatra, its PSGI/Plack compliance, and its large collection of plugins for features like templating, databases, REST, and more. The document advocates that Dancer allows for an efficient, succinct, and flexible approach to web development in Perl.
These are the slides I used at a lecture in YAPC::EU 2010 about running Perl on the Android mobile device operating system.
There is a screencast (audio + video) of it, which will hopefully become available soon.
This an attempt I've made at installing Dancer, the Perl web framework, on an Android emulator using ASE (Android Scripting Environment).
Plenty of things have changed since then, and when I make another attempt, I'll publish that as well.
These are slides from a lecture on Red Flags in Programming that took place at an Israeli Open Source Developers meeting.
Red flags in programming are signs that you likely made a mistake with your application design or code.
Noticing and avoiding these mistakes help us write better code, at any language.
The subject related to mostly dynamic (higher level) languages, even though the sample code is in Perl.
Buckeye Dreamin 2024: Assessing and Resolving Technical DebtLynda Kane
Slide Deck from Buckeye Dreamin' 2024 presentation Assessing and Resolving Technical Debt. Focused on identifying technical debt in Salesforce and working towards resolving it.
Automation Hour 1/28/2022: Capture User Feedback from AnywhereLynda Kane
Slide Deck from Automation Hour 1/28/2022 presentation Capture User Feedback from Anywhere presenting setting up a Custom Object and Flow to collection User Feedback in Dynamic Pages and schedule a report to act on that feedback regularly.
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...SOFTTECHHUB
I started my online journey with several hosting services before stumbling upon Ai EngineHost. At first, the idea of paying one fee and getting lifetime access seemed too good to pass up. The platform is built on reliable US-based servers, ensuring your projects run at high speeds and remain safe. Let me take you step by step through its benefits and features as I explain why this hosting solution is a perfect fit for digital entrepreneurs.
Big Data Analytics Quick Research Guide by Arthur MorganArthur Morgan
This is a Quick Research Guide (QRG).
QRGs include the following:
- A brief, high-level overview of the QRG topic.
- A milestone timeline for the QRG topic.
- Links to various free online resource materials to provide a deeper dive into the QRG topic.
- Conclusion and a recommendation for at least two books available in the SJPL system on the QRG topic.
QRGs planned for the series:
- Artificial Intelligence QRG
- Quantum Computing QRG
- Big Data Analytics QRG
- Spacecraft Guidance, Navigation & Control QRG (coming 2026)
- UK Home Computing & The Birth of ARM QRG (coming 2027)
Any questions or comments?
- Please contact Arthur Morgan at [email protected].
100% human made.
"Client Partnership — the Path to Exponential Growth for Companies Sized 50-5...Fwdays
Why the "more leads, more sales" approach is not a silver bullet for a company.
Common symptoms of an ineffective Client Partnership (CP).
Key reasons why CP fails.
Step-by-step roadmap for building this function (processes, roles, metrics).
Business outcomes of CP implementation based on examples of companies sized 50-500.
Technology Trends in 2025: AI and Big Data AnalyticsInData Labs
At InData Labs, we have been keeping an ear to the ground, looking out for AI-enabled digital transformation trends coming our way in 2025. Our report will provide a look into the technology landscape of the future, including:
-Artificial Intelligence Market Overview
-Strategies for AI Adoption in 2025
-Anticipated drivers of AI adoption and transformative technologies
-Benefits of AI and Big data for your business
-Tips on how to prepare your business for innovation
-AI and data privacy: Strategies for securing data privacy in AI models, etc.
Download your free copy nowand implement the key findings to improve your business.
Dev Dives: Automate and orchestrate your processes with UiPath MaestroUiPathCommunity
This session is designed to equip developers with the skills needed to build mission-critical, end-to-end processes that seamlessly orchestrate agents, people, and robots.
📕 Here's what you can expect:
- Modeling: Build end-to-end processes using BPMN.
- Implementing: Integrate agentic tasks, RPA, APIs, and advanced decisioning into processes.
- Operating: Control process instances with rewind, replay, pause, and stop functions.
- Monitoring: Use dashboards and embedded analytics for real-time insights into process instances.
This webinar is a must-attend for developers looking to enhance their agentic automation skills and orchestrate robust, mission-critical processes.
👨🏫 Speaker:
Andrei Vintila, Principal Product Manager @UiPath
This session streamed live on April 29, 2025, 16:00 CET.
Check out all our upcoming Dev Dives sessions at https://community.uipath.com/dev-dives-automation-developer-2025/.
This is the keynote of the Into the Box conference, highlighting the release of the BoxLang JVM language, its key enhancements, and its vision for the future.
Spark is a powerhouse for large datasets, but when it comes to smaller data workloads, its overhead can sometimes slow things down. What if you could achieve high performance and efficiency without the need for Spark?
At S&P Global Commodity Insights, having a complete view of global energy and commodities markets enables customers to make data-driven decisions with confidence and create long-term, sustainable value. 🌍
Explore delta-rs + CDC and how these open-source innovations power lightweight, high-performance data applications beyond Spark! 🚀
Role of Data Annotation Services in AI-Powered ManufacturingAndrew Leo
From predictive maintenance to robotic automation, AI is driving the future of manufacturing. But without high-quality annotated data, even the smartest models fall short.
Discover how data annotation services are powering accuracy, safety, and efficiency in AI-driven manufacturing systems.
Precision in data labeling = Precision on the production floor.
Procurement Insights Cost To Value Guide.pptxJon Hansen
Procurement Insights integrated Historic Procurement Industry Archives, serves as a powerful complement — not a competitor — to other procurement industry firms. It fills critical gaps in depth, agility, and contextual insight that most traditional analyst and association models overlook.
Learn more about this value- driven proprietary service offering here.
Special Meetup Edition - TDX Bengaluru Meetup #52.pptxshyamraj55
We’re bringing the TDX energy to our community with 2 power-packed sessions:
🛠️ Workshop: MuleSoft for Agentforce
Explore the new version of our hands-on workshop featuring the latest Topic Center and API Catalog updates.
📄 Talk: Power Up Document Processing
Dive into smart automation with MuleSoft IDP, NLP, and Einstein AI for intelligent document workflows.
6. … but why Moose?
package Person; package User;
use strict; use Email::Valid;
use warnings; use Moose;
use Moose::Util::TypeConstraints;
use Carp qw( confess );
use DateTime; extends 'Person';
use DateTime::Format::Natural;
subtype 'Email'
=> as 'Str'
sub new { => where { Email::Valid>address($_) }
my $class = shift; => message { "$_ is not a valid email
my %p = ref $_[0] ? %{ $_[0] } : @_; address" };
exists $p{name} has email_address => (
or confess 'name is a required attribute'; is => 'rw',
$class>_validate_name( $p{name} ); isa => 'Email',
required => 1,
exists $p{birth_date} );
or confess 'birth_date is a required attribute';
$p{birth_date} = $class
>_coerce_birth_date( $p{birth_date} );
$class>_validate_birth_date( $p{birth_date} );
$p{shirt_size} = 'l'
unless exists $p{shirt_size}:
$class>_validate_shirt_size( $p{shirt_size} );
return bless %p, $class;
}
sub _validate_name {
shift;
my $name = shift;
local $Carp::CarpLevel = $Carp::CarpLevel + 1;
defined $name
or confess 'name must be a string';
}
8. Writing objects in basic Perl 5
Create a reference (usually to a hash)
Connect it to a package (using „bless“)
Provide subroutines that access the hash keys
Error check the hell out of it
9. Writing objects in basic Perl 5, e.g.
package Dog;
use strict; use warnings;
sub new {
my $class = shift;
my $self = bless {}, $class;
return $self;
}
1;
10. Issues
Defining the same new() concept every time
No parameters for new() yet
Will have to do all error-checking manually
12. You get
use strict;
use warnings;
new() method
To hell with ponies, you get a moose!
(roll picture of a moose beating a pony in soccer)
13. Full affordance accessors (attributes)
has name => ( is => 'rw' );
„ro“ is available for read-only attributes
You can manually change setter/getter via writer/reader
Attributes can have defaults
Attributes can have type constraints
Attributes can have traits
Attributes can be lazy, have builders, clearers, predicates...
14. Type constraints
has name => ( is => 'ro', isa => 'Str' );
Str, Int, Bool, ArrayRef, HashRef, CodeRef, Regex,
Classes
Combine: ArrayRef|HashRef, ArrayRef[Str]
Derivatives (Int is a Num)
Create your own using subtype, available at
Moose::Util::TypeConstraints
15. Methods
Same as before
sub run {
my $self = shift;
say qq{I make it a habit only to run when
being chased!};
}
16. Inheritance easy as...
package Punk
use Moose;
extends 'Person';
Multiple inheritance also possible (extends accepts array)
package Child;
use Moose;
extends qw/Father Mother/;
17. Roles are even better
package Punk;
use Moose;
with qw/Tattoos Piercings Squatter/;
Roles are things you do, instead of things you are.
18. More hooks than a coat rack!
package User::WinterAware;
use Moose;
extends 'User';
before leaving => sub {
my $self = shift;
$self->cold and $self->take_jacket;
};
19. More hooks than a coat rack!
package User::Secure;
use Moose;
extends 'User';
around login => sub {
my $orig = shift;
my $self = shift;
$self->security_check and $self->$orig(@_);
};
20. More hooks than a coat rack!
Before
After
Around
Inner
Augment
21. Back to attributes...
has set => (
is => 'rw',
isa => 'Set::Object',
default => sub { Set::Object->new },
required => 1,
lazy => 1,
predicate => 'has_set',
clearer => 'clear_set',
22. Attribute options: default
default => 'kitteh' # string
default => 3 # number
default => sub { {} } # HashRef
default => sub { [] } # ArrayRef
default => sub { Object->new } # an Object
(if you need a more elaborate sub, use builder)
24. Attribute options: lazy
lazy => 1 # make it lazy
Class will not create the slot for this attribute unless it
absolutely has to, defined by whether it is accessed at all.
No access? No penalty!
Lazy == good
25. Attribute options: builder
builder => 'build_it' # subroutine name
sub build_it {
my $self = shift; # not a problem!
return Some::Object->new( $self-
>more_opts );
}
26. Attribute options: clearer
clearer => 'clear_it' # subroutine name
# you don't need to create the subroutine
sub time_machine {
my $self = shift;
$self->clear_it; # 'it' never happened :)
}
27. Attribute options: predicate
predicate => 'has_it' # subroutine name
# you don't need to create the subroutine
sub try_to_do_it {
my $self = shift;
$self->has_it && $self->do_it();
}
29. Example: Comican
A hub for various comics strips
Allow you to fetch comic strips
Standard uniformed interface to add more comics
We'll be using:
Roles
Lazy attributes
Overriding attributes options
Attribute predicates
30. Comican
comic modules Comican::Comic::Dilber
t interface
role
Comican::Comic::PennyArcade
Comican::Comic::xkcd Comican::
Role::Comic
main module
user
Comican.pm
31. Comican: overall
Comican.pm is the user's interface
It's a hub for Comican::Comic::* modules
They are objects that fetch specific comic strips
They have a common interface
Defined by Comican::Role::Comic
33. /^M(?:o(?:o|[ou]se)?)?$/
Moose: standart
Mouse: subset, uses XS, faster
(Any::Moose: use Mouse unless Moose already loaded)
Moo: Pure-Perl, subset, blazing fast
Mo: As little as possible (incl. character count)
M: Really as little as possible
Hummus (HuMoose): Incompatible chickpeas paste