<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<link href="https://perlmaven.com/atom" rel="self" />
<title>Perl</title>
<id>https://perlmaven.com</id>
<updated>2026-10-28T13:00:02</updated>

  <entry>
    <title>Using LLMs as coding agents</title>
    <summary type="html"><![CDATA[]]></summary>
    <updated>2026-10-28T13:00:02Z</updated>
    <pubDate>2026-10-28T13:00:02Z</pubDate>
    <link rel="alternate" type="text/html" href="https://perlmaven.com/using-llms-as-coding-agents" />
    <id>https://perlmaven.com/using-llms-as-coding-agents</id>
    <content type="html"><![CDATA[<h2 class="title is-4">Description</h2>
<p>The presentation will address the following topics:</p>
<ul>
<li>How do I use agents?</li>
<li>What differences are there?</li>
<li>What are my experiences?</li>
</ul>
<p>Most examples will focus around GLM 5.3 and Perl.</p>
<h2 class="title is-4">Speaker Bio:</h2>
<p><a href="https://www.linkedin.com/in/maximilian-maischein/">Maximilian Maischein</a> aka <a href="https://corion.net/">Corion</a>.</p>
<p>Max is a long-time Perl programmer and contributor. He is co-organizer of the German Perl Workshop and writes Perl code as a long-time hobby. At his dayjob, he combines bank deposits with DLT to create deposit tokens as digital money.</p>
<h2 class="title is-4">Length</h2>
<p>60 minutes</p>
<p><a class="button is-primary" href="https://luma.com/is9ow917">register</a></p>
]]></content>
    <author>
      <name></name>
    </author>
  </entry>

  <entry>
    <title>MCP - Model Context Protocol in Perl: From Web App to AI Tools with Dave Cross</title>
    <summary type="html"><![CDATA[]]></summary>
    <updated>2026-10-21T07:40:02Z</updated>
    <pubDate>2026-10-21T07:40:02Z</pubDate>
    <link rel="alternate" type="text/html" href="https://perlmaven.com/mcp-model-context-protocol-in-perl-from-web-app-to-ai-tools" />
    <id>https://perlmaven.com/mcp-model-context-protocol-in-perl-from-web-app-to-ai-tools</id>
    <content type="html"><![CDATA[<h2 class="title is-4">Description</h2>
<p>The Model Context Protocol (MCP) has rapidly become the standard way for AI assistants to interact with external applications. But how do you add MCP support to an application that already exists?</p>
<p>In this practical workshop we'll take a real Dancer2 application and add an MCP server that exposes its existing functionality to AI clients. Along the way we'll look at the MCP protocol, JSON-RPC, tool discovery, schema design and request handling, while keeping the implementation cleanly separated from the application's existing business logic.</p>
<p>We'll see how a YAML-driven design allows a single source of truth for tool definitions and documentation, and why adding MCP often turns out to be far less work than you'd expect when your application's architecture is already sound.</p>
<p>By the end of the session you'll understand the MCP protocol, know how to implement an MCP server in Perl, and have a design you can adapt to your own applications.</p>
<h2 class="title is-4">Speaker:</h2>
<p><a href="https://www.linkedin.com/in/davorg/">Dave Cross</a> has been writing Perl professionally for more than thirty years. He is the author of several Perl books, including Data Munging with Perl (Manning) and Perl Template Toolkit (O'Reilly), and has been speaking at Perl conferences around the world since the late 1990s.</p>
<p>He builds web applications with Dancer2, contributes to open source, and has recently been exploring how established Perl applications can integrate with modern AI technologies such as the Model Context Protocol (MCP). His Line of Succession website now exposes its data through an MCP server, allowing AI assistants to query Britain's royal succession directly from the site's underlying database.</p>
<p>Dave believes the best way to learn a new technology is to build something real with it, and this workshop is based on exactly that experience.</p>
<h2 class="title is-4">Length</h2>
<p>1 hour</p>
<h2 class="title is-4">Slides</h2>
<p>Slides and other stuff available on the talks site of Dave Cross:</p>
<p><a href="https://talks.davecross.co.uk/talk/model-context-protocol-in-perl-from-web-app-to-ai-tools/">Model Context Protocol in Perl: From Web App to AI Tools</a></p>
<iframe width="560" height="315" src="https://www.youtube.com/embed/st_tZs5AJ0c" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>
<h2 class="title is-4">Transcription</h2>
<p>00:00:03.000 --&gt; 00:00:15.000
Excellent. So welcome to the Code Maven channel. If you are watching on the YouTube, if you are here, thank you. Really. I'm so many people joined us.</p>
<p>00:00:15.000 --&gt; 00:00:31.000
You are lucky because you can ask questions and we had a chat earlier, and you're going to have a chat after the presentation. But for now, let's welcome Dave Cross. Thank you very much for agreeing to give this presentation, although probably everyone in the Perl community knows you.</p>
<p>00:00:31.000 --&gt; 00:00:35.000
We start with some introduction and then go ahead, the stage is yours.</p>
<p>00:00:35.000 --&gt; 00:00:40.000
Okay, well, thanks for asking me to do this presentation.</p>
<p>00:00:40.000 --&gt; 00:00:50.000
Yeah, so as Debor said, I'm Dave Cross. I've been using Perl for, I think it's probably 30 years now.</p>
<p>00:00:50.000 --&gt; 00:00:52.000
Um, I…</p>
<p>00:00:52.000 --&gt; 00:01:01.000
I worked for a huge number of different companies because I was a freelancer for the longest time.</p>
<p>00:01:01.000 --&gt; 00:01:08.000
working for banks and startups and places like the BBC and The Guardian.</p>
<p>00:01:08.000 --&gt; 00:01:13.000
But if you've been to a Pearl conference, particularly in Europe,</p>
<p>00:01:13.000 --&gt; 00:01:17.000
Over the last 25 years or so, there's a good chance you've.</p>
<p>00:01:17.000 --&gt; 00:01:22.000
seen me give a talk. I've written a few books.</p>
<p>00:01:22.000 --&gt; 00:01:32.000
Um, most well known is probably data munging with Perl, and I should probably mention that there's a second edition of that.</p>
<p>00:01:32.000 --&gt; 00:01:34.000
about.</p>
<p>00:01:34.000 --&gt; 00:01:38.000
the next month, probably in a month's time.</p>
<p>00:01:38.000 --&gt; 00:01:45.000
But yes, so today we are going to talk about.</p>
<p>00:01:45.000 --&gt; 00:01:50.000
The model context, protocol, specifically putting it.</p>
<p>00:01:50.000 --&gt; 00:02:00.000
on the front of an existing Perl application and the application that I chose to do it with was my.</p>
<p>00:02:00.000 --&gt; 00:02:02.000
British royal…</p>
<p>00:02:02.000 --&gt; 00:02:05.000
family line of succession website.</p>
<p>00:02:05.000 --&gt; 00:02:14.000
But by the way, Dave, I think we are seeing the snipping tool on your screen. I'm not sure if that was the intention.</p>
<p>00:02:14.000 --&gt; 00:02:16.000
Or it's my screen, I'm not worried. No, it's not.</p>
<p>00:02:16.000 --&gt; 00:02:19.000
Uh, oh, hang on.</p>
<p>00:02:19.000 --&gt; 00:02:20.000
Maybe.</p>
<p>00:02:20.000 --&gt; 00:02:26.000
Maybe we are seeing a different screen that you wanted to share.</p>
<p>00:02:26.000 --&gt; 00:02:30.000
Okay, let me see if I can.</p>
<p>00:02:30.000 --&gt; 00:02:46.000
Work out how to stop sharing.</p>
<p>00:02:46.000 --&gt; 00:02:50.000
There should be some way for me to.</p>
<p>00:02:50.000 --&gt; 00:02:55.000
Stop sharing the screen.</p>
<p>00:02:55.000 --&gt; 00:03:04.000
Oh.</p>
<p>00:03:04.000 --&gt; 00:03:11.000
Is that better?</p>
<p>00:03:11.000 --&gt; 00:03:19.000
Can you see the Zoom screen now?</p>
<p>00:03:19.000 --&gt; 00:03:21.000
I'm getting loads of thumbs up.</p>
<p>00:03:21.000 --&gt; 00:03:22.000
So, okay.</p>
<p>00:03:22.000 --&gt; 00:03:26.000
Okay.</p>
<p>00:03:26.000 --&gt; 00:03:27.000
Let's go back to this then.</p>
<p>00:03:27.000 --&gt; 00:03:30.000
I was giving you feedback, but while I was on mute. So yeah.</p>
<p>00:03:30.000 --&gt; 00:03:41.000
So we're all at, yeah, I can see green lines around that screen now, so that sounds like we're in the right place. Okay, so as I was saying, I have this web app.</p>
<p>00:03:41.000 --&gt; 00:03:45.000
Um, which, um, deals with the, uh,</p>
<p>00:03:45.000 --&gt; 00:03:57.000
British royal family, the line of succession to the throne, which enables you to answer questions like this, who was the sovereign?</p>
<p>00:03:57.000 --&gt; 00:04:06.000
On the states, who are the first five people in line to the throne, for example.</p>
<p>00:04:06.000 --&gt; 00:04:08.000
Um…</p>
<p>00:04:08.000 --&gt; 00:04:21.000
So what we're going to talk about is I'm going to give you a brief introduction to the existing application. We're going to talk a bit about what MCP is and how that works. We will then</p>
<p>00:04:21.000 --&gt; 00:04:28.000
have a bit of a look at the code and trace how one request goes through the code.</p>
<p>00:04:28.000 --&gt; 00:04:41.000
And then we will look at what I learned whilst I was doing this, and what I might want to do next. And hopefully, we will have plenty of time at the end for you to ask.</p>
<p>00:04:41.000 --&gt; 00:04:44.000
Any questions?</p>
<p>00:04:44.000 --&gt; 00:04:47.000
Okay, so…</p>
<p>00:04:47.000 --&gt; 00:04:58.000
Like so many websites, certainly like most of the websites that I've ever worked on, the line of succession is basically a database with.</p>
<p>00:04:58.000 --&gt; 00:05:11.000
pretty front-end on it. And what it does is it gives you current and historical information about the British line of succession. Let me just</p>
<p>00:05:11.000 --&gt; 00:05:13.000
see if I can…</p>
<p>00:05:13.000 --&gt; 00:05:16.000
Bring it up so that you can.</p>
<p>00:05:16.000 --&gt; 00:05:21.000
see it.</p>
<p>00:05:21.000 --&gt; 00:05:27.000
So this is the home page of the website.</p>
<p>00:05:27.000 --&gt; 00:05:33.000
And it's got a list of the people who are in the British line of succession. It does the top, it does the first 30.</p>
<p>00:05:33.000 --&gt; 00:05:50.000
Um, and that's not very interesting because there are dozens of websites out there that do that. But the interesting thing here is if you notice every date that you see is a link. And if we click on one of these links.</p>
<p>00:05:50.000 --&gt; 00:05:58.000
It goes back in time and shows you who was on the line of succession at that date.</p>
<p>00:05:58.000 --&gt; 00:06:02.000
Now, I wrote it because…</p>
<p>00:06:02.000 --&gt; 00:06:12.000
I found it an interesting problem to work on, to solve, but people do seem to find it interesting. It's of all the websites that I run.</p>
<p>00:06:12.000 --&gt; 00:06:24.000
This has the most usage of any of my website. It has thousands of hits every month.</p>
<p>00:06:24.000 --&gt; 00:06:36.000
Right. So, it's a dancer website, there's a SQLite database, because the data's actually pretty small.</p>
<p>00:06:36.000 --&gt; 00:06:45.000
a number of you, when we were going through the introductions earlier, a number of you, um, indicated that you… that you knew what dancer was.</p>
<p>00:06:45.000 --&gt; 00:06:50.000
But it's a web framework.</p>
<p>00:06:50.000 --&gt; 00:06:56.000
It basically, it matches roots and a root is a…</p>
<p>00:06:56.000 --&gt; 00:07:01.000
HTTP verb, so get, put.</p>
<p>00:07:01.000 --&gt; 00:07:03.000
Delete.</p>
<p>00:07:03.000 --&gt; 00:07:04.000
query.</p>
<p>00:07:04.000 --&gt; 00:07:08.000
against a path, so the roots or</p>
<p>00:07:08.000 --&gt; 00:07:10.000
some path.</p>
<p>00:07:10.000 --&gt; 00:07:17.000
run some code, and at the end of that code, it produces some HTML.</p>
<p>00:07:17.000 --&gt; 00:07:22.000
And then the important thing to bear in mind here is that</p>
<p>00:07:22.000 --&gt; 00:07:25.000
like most</p>
<p>00:07:25.000 --&gt; 00:07:33.000
applications that I write, web applications that I write, I'm very always careful to include a model layer.</p>
<p>00:07:33.000 --&gt; 00:07:43.000
In the system. So that means I'm not putting raw DBIS class or DBI.</p>
<p>00:07:43.000 --&gt; 00:07:44.000
Road.</p>
<p>00:07:44.000 --&gt; 00:07:49.000
In the request handling code.</p>
<p>00:07:49.000 --&gt; 00:07:50.000
Um…</p>
<p>00:07:50.000 --&gt; 00:07:57.000
I'm putting it in a separate layer. Let's just…</p>
<p>00:07:57.000 --&gt; 00:07:59.000
uh, show you a bit more of the code.</p>
<p>00:07:59.000 --&gt; 00:08:01.000
Um…</p>
<p>00:08:01.000 --&gt; 00:08:05.000
So for example,</p>
<p>00:08:05.000 --&gt; 00:08:11.000
So here I think I'll have to ask you if you could enlarge a little bit the font.</p>
<p>00:08:11.000 --&gt; 00:08:12.000
Probably.</p>
<p>00:08:12.000 --&gt; 00:08:16.000
Do we won't see?</p>
<p>00:08:16.000 --&gt; 00:08:17.000
Is that enough?</p>
<p>00:08:17.000 --&gt; 00:08:18.000
Yeah, thanks. Thanks. Wow.</p>
<p>00:08:18.000 --&gt; 00:08:25.000
That's, yeah.</p>
<p>00:08:25.000 --&gt; 00:08:27.000
Um, right.</p>
<p>00:08:27.000 --&gt; 00:08:29.000
So, let's</p>
<p>00:08:29.000 --&gt; 00:08:31.000
All right.</p>
<p>00:08:31.000 --&gt; 00:08:37.000
This rather complicated looking bit, uh, is the bit that does the main, the main page.</p>
<p>00:08:37.000 --&gt; 00:08:41.000
Um, and so if you get a GET request,</p>
<p>00:08:41.000 --&gt; 00:08:45.000
to something… this matches a date.</p>
<p>00:08:45.000 --&gt; 00:08:50.000
or nothing, because that's all optional.</p>
<p>00:08:50.000 --&gt; 00:08:54.000
Uh, then basically what it does.</p>
<p>00:08:54.000 --&gt; 00:08:58.000
Is that we create an app,</p>
<p>00:08:58.000 --&gt; 00:08:59.000
I.</p>
<p>00:08:59.000 --&gt; 00:09:02.000
And the app is the thing that…</p>
<p>00:09:02.000 --&gt; 00:09:04.000
goes on top of the model.</p>
<p>00:09:04.000 --&gt; 00:09:11.000
allows you to get the useful information from the database. So there's actually very little code.</p>
<p>00:09:11.000 --&gt; 00:09:14.000
in this, it just calls template.</p>
<p>00:09:14.000 --&gt; 00:09:22.000
And if we…</p>
<p>00:09:22.000 --&gt; 00:09:23.000
Find…</p>
<p>00:09:23.000 --&gt; 00:09:26.000
the…</p>
<p>00:09:26.000 --&gt; 00:09:29.000
index template.</p>
<p>00:09:29.000 --&gt; 00:09:34.000
For example,</p>
<p>00:09:34.000 --&gt; 00:09:35.000
Uh, yes, same.</p>
<p>00:09:35.000 --&gt; 00:09:43.000
Here we are, we've asked the app for the rows that are in the succession.</p>
<p>00:09:43.000 --&gt; 00:09:47.000
for the… for the current date that we're displaying.</p>
<p>00:09:47.000 --&gt; 00:09:50.000
And so there's no database code.</p>
<p>00:09:50.000 --&gt; 00:10:00.000
in either the request handler or the template. It's all in this model.</p>
<p>00:10:00.000 --&gt; 00:10:02.000
Layer.</p>
<p>00:10:02.000 --&gt; 00:10:05.000
And that turned out to be a real</p>
<p>00:10:05.000 --&gt; 00:10:08.000
really useful idea.</p>
<p>00:10:08.000 --&gt; 00:10:12.000
Um, so, because in the existing model,</p>
<p>00:10:12.000 --&gt; 00:10:17.000
We have these, well, we have a number of methods, but in particular,</p>
<p>00:10:17.000 --&gt; 00:10:28.000
We have these methods called sovereign on date, which you pass a date and it gives you back the name of the, well, the details of the person who was the sovereign on that date.</p>
<p>00:10:28.000 --&gt; 00:10:40.000
And we have another method called getSuccessionData. Again, you pass it a date and you pass it a limit, which is the number of people that you're interested in seeing, and it returns you.</p>
<p>00:10:40.000 --&gt; 00:10:51.000
data for all of the people who were in the line of succession in order on that date.</p>
<p>00:10:51.000 --&gt; 00:10:56.000
And this turns out to be quite a powerful idea.</p>
<p>00:10:56.000 --&gt; 00:11:04.000
Because it allows you to have different views on the same data.</p>
<p>00:11:04.000 --&gt; 00:11:12.000
So we saw the web page and the web page serves hugely.</p>
<p>00:11:12.000 --&gt; 00:11:17.000
humans that turn up and open their browser and look at the website?</p>
<p>00:11:17.000 --&gt; 00:11:27.000
But we have a JSON API, actually it's turned off I think, at the moment because it's not particularly useful. But that's there for…</p>
<p>00:11:27.000 --&gt; 00:11:30.000
Machines for software programs.</p>
<p>00:11:30.000 --&gt; 00:11:48.000
programs, they can do similar queries to what humans do when they go to the website, but instead of getting back a web page with the navigation and the sidebars and all that kind of thing, the machines, when they call the API,</p>
<p>00:11:48.000 --&gt; 00:11:56.000
get just the pure data back in a format that they understand stops them having to scrape the page.</p>
<p>00:11:56.000 --&gt; 00:12:03.000
And then we have this new method. And bear in mind, the</p>
<p>00:12:03.000 --&gt; 00:12:11.000
The Line of Succession website has been around for approaching 10 years now.</p>
<p>00:12:11.000 --&gt; 00:12:21.000
So nobody knew about MCP when I first wrote the, this website.</p>
<p>00:12:21.000 --&gt; 00:12:37.000
This shows the flexibility that because I have this model layer, I'm able to deal with something brand new that nobody had heard of a couple of years ago and just write an MCP layer.</p>
<p>00:12:37.000 --&gt; 00:12:42.000
On top of it, which, so, I now have</p>
<p>00:12:42.000 --&gt; 00:12:47.000
web service that can serve readers.</p>
<p>00:12:47.000 --&gt; 00:12:55.000
serve pieces of software through the API, but can also serve AI clients.</p>
<p>00:12:55.000 --&gt; 00:13:03.000
And when I say AI clients, we will see a bit later on the kind of things that can</p>
<p>00:13:03.000 --&gt; 00:13:06.000
talk to it, but you can write</p>
<p>00:13:06.000 --&gt; 00:13:08.000
uh, software.</p>
<p>00:13:08.000 --&gt; 00:13:16.000
that uses, for example, the OpenAI API and ask that to include.</p>
<p>00:13:16.000 --&gt; 00:13:19.000
by MCP tool.</p>
<p>00:13:19.000 --&gt; 00:13:31.000
But you can also just include my MCP tool in your Claude or your OpenAI chat bot.</p>
<p>00:13:31.000 --&gt; 00:13:38.000
And we'll see how all that works a bit later on.</p>
<p>00:13:38.000 --&gt; 00:13:44.000
Okay, so put yourself in the mind of the…</p>
<p>00:13:44.000 --&gt; 00:13:47.000
assistant, the LLM.</p>
<p>00:13:47.000 --&gt; 00:13:52.000
the AI tool that wants to get to this information.</p>
<p>00:13:52.000 --&gt; 00:13:58.000
It needs to know a number of things. It needs to know which operations are available.</p>
<p>00:13:58.000 --&gt; 00:14:06.000
It needs to know, what does each operation do? Why would it use each operation?</p>
<p>00:14:06.000 --&gt; 00:14:12.000
Um, which arguments does it need to pass in order to get useful information back?</p>
<p>00:14:12.000 --&gt; 00:14:17.000
Um, and what's the format of the data?</p>
<p>00:14:17.000 --&gt; 00:14:21.000
But it gets back.</p>
<p>00:14:21.000 --&gt; 00:14:29.000
Um, so we need to set up definitions for the answer all of those four questions.</p>
<p>00:14:29.000 --&gt; 00:14:33.000
And that is what…</p>
<p>00:14:33.000 --&gt; 00:14:40.000
model context, protocol gives us. Now this was, I guess it's probably been around for</p>
<p>00:14:40.000 --&gt; 00:14:48.000
two, maybe three years now. It came from Anthropic, the people behind Claude.</p>
<p>00:14:48.000 --&gt; 00:14:56.000
Uh, and it's a protocol for connecting AI applications with any kind of external.</p>
<p>00:14:56.000 --&gt; 00:15:03.000
capability, an external server. If you, um…</p>
<p>00:15:03.000 --&gt; 00:15:12.000
If you access… if you use Claude or OpenAI or ChatGPT to</p>
<p>00:15:12.000 --&gt; 00:15:25.000
interface with GitHub, for example. If you ask your ChatGPT agent to give you a list of the open issues on a GitHub.</p>
<p>00:15:25.000 --&gt; 00:15:35.000
repo. It's using an MCP that GitHub have made available. If you</p>
<p>00:15:35.000 --&gt; 00:15:37.000
Um, all.</p>
<p>00:15:37.000 --&gt; 00:15:43.000
Claude to check your calendar and see if you've got room to add in.</p>
<p>00:15:43.000 --&gt; 00:15:48.000
an appointment on a certain date.</p>
<p>00:15:48.000 --&gt; 00:15:54.000
It can do that because Google have made available an MCP that allows.</p>
<p>00:15:54.000 --&gt; 00:16:00.000
AI to talk to your Google Calendar. In fact, anything in your Google.</p>
<p>00:16:00.000 --&gt; 00:16:04.000
workspace.</p>
<p>00:16:04.000 --&gt; 00:16:09.000
So these are the four things that you need to.</p>
<p>00:16:09.000 --&gt; 00:16:16.000
Implement if you're writing an MCP.</p>
<p>00:16:16.000 --&gt; 00:16:19.000
You need to respond to an initialized call.</p>
<p>00:16:19.000 --&gt; 00:16:34.000
So which is basically just the client talking to the server and saying, here I am, I'm going to be asking you some questions. You can do quite clever stuff in there, but to be honest, my use case</p>
<p>00:16:34.000 --&gt; 00:16:41.000
I barely need that at all. I only need it because, um…</p>
<p>00:16:41.000 --&gt; 00:16:45.000
the AI tools expect it to exist.</p>
<p>00:16:45.000 --&gt; 00:16:52.000
There's notification initialized, which, to be honest, I haven't had to use at all in my.</p>
<p>00:16:52.000 --&gt; 00:16:55.000
tool.</p>
<p>00:16:55.000 --&gt; 00:16:57.000
And then there's tools list.</p>
<p>00:16:57.000 --&gt; 00:16:59.000
Which…</p>
<p>00:16:59.000 --&gt; 00:17:06.000
Gives you a list of tools, as you might expect. You make a request to it and you just get back.</p>
<p>00:17:06.000 --&gt; 00:17:09.000
A data structure, JSON.</p>
<p>00:17:09.000 --&gt; 00:17:17.000
which lists all the tools that are available in from that MCP.</p>
<p>00:17:17.000 --&gt; 00:17:27.000
And then finally, you have Talk's call, which actually makes a call to one of your tools and</p>
<p>00:17:27.000 --&gt; 00:17:34.000
sends back the data which the AI will then.</p>
<p>00:17:34.000 --&gt; 00:17:41.000
Use.</p>
<p>00:17:41.000 --&gt; 00:17:57.000
Uh, so we're going to write, I have written two domain tools for my application and purely coincidentally, they happen to map onto the tool, the two model methods that we</p>
<p>00:17:57.000 --&gt; 00:18:01.000
talked about earlier, we're going to have</p>
<p>00:18:01.000 --&gt; 00:18:17.000
sovereign on date, which gives us the name of the sovereign on a particular date and line of succession, which you can pass it in a date and you'll get back a list of information about the people who were on the line of succession.</p>
<p>00:18:17.000 --&gt; 00:18:21.000
On that date.</p>
<p>00:18:21.000 --&gt; 00:18:26.000
So the first thing you need to do is to define</p>
<p>00:18:26.000 --&gt; 00:18:31.000
The way that these, um, tools are going to be called.</p>
<p>00:18:31.000 --&gt; 00:18:43.000
Now there's a cut down version of it here, but if I bring up my</p>
<p>00:18:43.000 --&gt; 00:18:50.000
VS Code, then in the public directory.</p>
<p>00:18:50.000 --&gt; 00:18:53.000
Here's the entire…</p>
<p>00:18:53.000 --&gt; 00:18:57.000
file and you can see it's got a description.</p>
<p>00:18:57.000 --&gt; 00:19:06.000
It's got some hints which we don't need to worry about. We've got the actual documentation and then importantly, we have the input schema.</p>
<p>00:19:06.000 --&gt; 00:19:14.000
which says, so this is sovereign on date we're looking at. You need to pass it an object, a JSON object.</p>
<p>00:19:14.000 --&gt; 00:19:21.000
The properties that you can set, you can give it are a date.</p>
<p>00:19:21.000 --&gt; 00:19:28.000
And it's expecting the day in ISO standard format, and it's also saying that date is required.</p>
<p>00:19:28.000 --&gt; 00:19:34.000
Whereas the other tool, Line of Succession,</p>
<p>00:19:34.000 --&gt; 00:19:38.000
Um, .</p>
<p>00:19:38.000 --&gt; 00:19:49.000
It's got a date and it's also got a limit, but none of them are required. Neither of those are required. If you don't pass the date, it works on today.</p>
<p>00:19:49.000 --&gt; 00:19:54.000
And if you don't pass the limit, it defaults to 10.</p>
<p>00:19:54.000 --&gt; 00:19:56.000
And that's defined.</p>
<p>00:19:56.000 --&gt; 00:20:05.000
that file.</p>
<p>00:20:05.000 --&gt; 00:20:12.000
And interestingly, I was quite pleased when I worked out I could do this.</p>
<p>00:20:12.000 --&gt; 00:20:15.000
I can use that file,</p>
<p>00:20:15.000 --&gt; 00:20:19.000
In two ways, I can…</p>
<p>00:20:19.000 --&gt; 00:20:24.000
Um, pass it to the.</p>
<p>00:20:24.000 --&gt; 00:20:31.000
When a method, when a client calls tools list,</p>
<p>00:20:31.000 --&gt; 00:20:36.000
I can extract useful information out of that file to</p>
<p>00:20:36.000 --&gt; 00:20:39.000
return it to the…</p>
<p>00:20:39.000 --&gt; 00:20:47.000
user, or to the client, but also I've got a documentation page on the</p>
<p>00:20:47.000 --&gt; 00:20:54.000
On the website, and I can extract information from that.</p>
<p>00:20:54.000 --&gt; 00:20:57.000
Uh…</p>
<p>00:20:57.000 --&gt; 00:20:59.000
From that document to determine.</p>
<p>00:20:59.000 --&gt; 00:21:05.000
displayed on the web page. If I go back to the website,</p>
<p>00:21:05.000 --&gt; 00:21:15.000
I'm right at the bottom here, we have a link to MCP.</p>
<p>00:21:15.000 --&gt; 00:21:18.000
And here we have documentation of the…</p>
<p>00:21:18.000 --&gt; 00:21:21.000
of available tools.</p>
<p>00:21:21.000 --&gt; 00:21:23.000
And there's the input schema.</p>
<p>00:21:23.000 --&gt; 00:21:25.000
here.</p>
<p>00:21:25.000 --&gt; 00:21:31.000
And if we look at the…</p>
<p>00:21:31.000 --&gt; 00:21:34.000
Template for the MCP page.</p>
<p>00:21:34.000 --&gt; 00:21:38.000
get to the available tools section.</p>
<p>00:21:38.000 --&gt; 00:21:42.000
You can see it's just been passed in that YAML.</p>
<p>00:21:42.000 --&gt; 00:21:54.000
the decoded version of that YAML and it just iterates across that. So as soon as if I go to add a new tool, as soon as I document it.</p>
<p>00:21:54.000 --&gt; 00:21:56.000
And</p>
<p>00:21:56.000 --&gt; 00:22:01.000
in the YAML file, it will automatically.</p>
<p>00:22:01.000 --&gt; 00:22:02.000
appear.</p>
<p>00:22:02.000 --&gt; 00:22:07.000
the documentation page, as well as.</p>
<p>00:22:07.000 --&gt; 00:22:13.000
automatically appearing in response to the tools list.</p>
<p>00:22:13.000 --&gt; 00:22:20.000
Call. The only thing I actually have to do is obviously implement that.</p>
<p>00:22:20.000 --&gt; 00:22:30.000
new tool in whatever way seems appropriate to me.</p>
<p>00:22:30.000 --&gt; 00:22:31.000
Um.</p>
<p>00:22:31.000 --&gt; 00:22:37.000
So the MCP object, which we'll look at in a bit more detail soon.</p>
<p>00:22:37.000 --&gt; 00:22:38.000
Um,</p>
<p>00:22:38.000 --&gt; 00:22:44.000
Has two methods. Tools returns the actual.</p>
<p>00:22:44.000 --&gt; 00:22:46.000
Object.</p>
<p>00:22:46.000 --&gt; 00:22:50.000
for returning to the tools list.</p>
<p>00:22:50.000 --&gt; 00:22:54.000
Um, cool, but tall docs.</p>
<p>00:22:54.000 --&gt; 00:23:02.000
returns it in a slightly different format, which can be used on the web page.</p>
<p>00:23:02.000 --&gt; 00:23:09.000
Um, but reusing things is…</p>
<p>00:23:09.000 --&gt; 00:23:13.000
an idea that we've managed to use again.</p>
<p>00:23:13.000 --&gt; 00:23:14.000
But in…</p>
<p>00:23:14.000 --&gt; 00:23:18.000
our dancer code.</p>
<p>00:23:18.000 --&gt; 00:23:27.000
So this is in the main…</p>
<p>00:23:27.000 --&gt; 00:23:30.000
Library, which defines all of the.</p>
<p>00:23:30.000 --&gt; 00:23:33.000
Um, .</p>
<p>00:23:33.000 --&gt; 00:23:37.000
defines all of the roots.</p>
<p>00:23:37.000 --&gt; 00:23:46.000
And obviously, so the page that I just showed you, the MCP documentation page, sits at…</p>
<p>00:23:46.000 --&gt; 00:23:49.000
MCP.</p>
<p>00:23:49.000 --&gt; 00:23:53.000
So when you do a GET on MCP, you</p>
<p>00:23:53.000 --&gt; 00:23:56.000
want to be returned.</p>
<p>00:23:56.000 --&gt; 00:23:58.000
that page.</p>
<p>00:23:58.000 --&gt; 00:24:12.000
However, in some implementations of MCP, the MCP client will do a GET on MCP in order to work out whether.</p>
<p>00:24:12.000 --&gt; 00:24:16.000
an event stream is defined.</p>
<p>00:24:16.000 --&gt; 00:24:26.000
On that URL, on that path, um, and they do that by adding an accept header of text event string. Now,</p>
<p>00:24:26.000 --&gt; 00:24:31.000
I don't know how event streams work.</p>
<p>00:24:31.000 --&gt; 00:24:41.000
But I just know that you have to tell them that they don't… it doesn't exist if it doesn't exist. So I return a HTTP 405.</p>
<p>00:24:41.000 --&gt; 00:24:46.000
and tell them to do a post instead.</p>
<p>00:24:46.000 --&gt; 00:24:49.000
Otherwise,</p>
<p>00:24:49.000 --&gt; 00:25:00.000
We just run the template, which is the template I showed you a couple of minutes ago and pass in the tools, which it then expands into the web page.</p>
<p>00:25:00.000 --&gt; 00:25:01.000
But…</p>
<p>00:25:01.000 --&gt; 00:25:06.000
the actual work of the MCP.</p>
<p>00:25:06.000 --&gt; 00:25:10.000
Is all done behind a post.</p>
<p>00:25:10.000 --&gt; 00:25:15.000
So this is this piece of code is a bit more complicated and we will look at that.</p>
<p>00:25:15.000 --&gt; 00:25:20.000
Soon.</p>
<p>00:25:20.000 --&gt; 00:25:25.000
Okay, so…</p>
<p>00:25:25.000 --&gt; 00:25:34.000
The interaction, the request and the response are all done using JSON RPC.</p>
<p>00:25:34.000 --&gt; 00:25:41.000
Uh, so we need to set the content type to return application JSON.</p>
<p>00:25:41.000 --&gt; 00:25:44.000
And the</p>
<p>00:25:44.000 --&gt; 00:25:50.000
the JSON that defines the call that the client is making.</p>
<p>00:25:50.000 --&gt; 00:25:53.000
is in the</p>
<p>00:25:53.000 --&gt; 00:25:56.000
body. So we get the request body.</p>
<p>00:25:56.000 --&gt; 00:26:06.000
Parse it from JSON into a Perl data structure and store that in the request.</p>
<p>00:26:06.000 --&gt; 00:26:07.000
variable.</p>
<p>00:26:07.000 --&gt; 00:26:11.000
Make sure that we do a little bit of validation that what we've got is the correct thing.</p>
<p>00:26:11.000 --&gt; 00:26:18.000
This minus 32,000 is a, uh,</p>
<p>00:26:18.000 --&gt; 00:26:33.000
A value that is defined in the JSON RPC specification, and if you were to say to me, Dave, that's ridiculous having a magic number like that in your code, you should really have it as a symbolic</p>
<p>00:26:33.000 --&gt; 00:26:44.000
constant, I would say you are absolutely right, and that's one of the issues that I need to fix very soon.</p>
<p>00:26:44.000 --&gt; 00:26:50.000
Then we extract the method.</p>
<p>00:26:50.000 --&gt; 00:26:53.000
From the request.</p>
<p>00:26:53.000 --&gt; 00:26:55.000
Uh, and then we basically</p>
<p>00:26:55.000 --&gt; 00:27:01.000
dispatch on whatever the method is and doing</p>
<p>00:27:01.000 --&gt; 00:27:06.000
whatever clever stuff we need to do in order to get the data.</p>
<p>00:27:06.000 --&gt; 00:27:19.000
which initialize, we get the initialize data and we'll return that. If it's tools list, we get the tools data and we return that. Both of these are pretty much hard coded.</p>
<p>00:27:19.000 --&gt; 00:27:23.000
Or they're at least, um…</p>
<p>00:27:23.000 --&gt; 00:27:27.000
uh, filled in from the…</p>
<p>00:27:27.000 --&gt; 00:27:34.000
YAML file that we've talked about before.</p>
<p>00:27:34.000 --&gt; 00:27:49.000
Something we should just quickly mention is all of these JSON RPC calls have an ID in them. Nothing magic to that at all. It's just an ID. It's just a string or a number that the…</p>
<p>00:27:49.000 --&gt; 00:27:53.000
Client assigned to a request.</p>
<p>00:27:53.000 --&gt; 00:27:58.000
And the server echoes that.</p>
<p>00:27:58.000 --&gt; 00:28:02.000
ID back in the response so that the</p>
<p>00:28:02.000 --&gt; 00:28:09.000
A client can tie up requests and responses, which allows them to fire off multiple requests.</p>
<p>00:28:09.000 --&gt; 00:28:19.000
At the same time, and work out which response matches each request.</p>
<p>00:28:19.000 --&gt; 00:28:23.000
So what does calling a…</p>
<p>00:28:23.000 --&gt; 00:28:26.000
at all actually look like?</p>
<p>00:28:26.000 --&gt; 00:28:31.000
This is the JSON that would be in the body of a call.</p>
<p>00:28:31.000 --&gt; 00:28:35.000
Um, to find the version of JSON RPC that we're using.</p>
<p>00:28:35.000 --&gt; 00:28:43.000
Give it an ID. Again, that's just a number that's made up by the client. Tell it which method we actually want to call.</p>
<p>00:28:43.000 --&gt; 00:28:53.000
then give it the parameters and the essential parameter is obviously the name of the tool that we're calling.</p>
<p>00:28:53.000 --&gt; 00:28:55.000
And then arguments.</p>
<p>00:28:55.000 --&gt; 00:29:01.000
the arguments that were in the input specification, the input schema.</p>
<p>00:29:01.000 --&gt; 00:29:05.000
Um…</p>
<p>00:29:05.000 --&gt; 00:29:11.000
And then, in the code, and we'll dig into the code very soon.</p>
<p>00:29:11.000 --&gt; 00:29:13.000
Uh…</p>
<p>00:29:13.000 --&gt; 00:29:16.000
We have, um…</p>
<p>00:29:16.000 --&gt; 00:29:20.000
a reference to the… to our model layer.</p>
<p>00:29:20.000 --&gt; 00:29:25.000
And in the model layer, we just call these two methods.</p>
<p>00:29:25.000 --&gt; 00:29:29.000
That we talked about.</p>
<p>00:29:29.000 --&gt; 00:29:39.000
The methods that already existed in the model layer. So I haven't had to write any</p>
<p>00:29:39.000 --&gt; 00:29:42.000
line of succession-specific code, because I'm just using code</p>
<p>00:29:42.000 --&gt; 00:29:51.000
that already exists in the application. The only code that I'm writing here is</p>
<p>00:29:51.000 --&gt; 00:29:55.000
scaffolding code for how the MCP.</p>
<p>00:29:55.000 --&gt; 00:29:57.000
works. So…</p>
<p>00:29:57.000 --&gt; 00:30:03.000
On that note, let's have a…</p>
<p>00:30:03.000 --&gt; 00:30:05.000
We're going to look at two</p>
<p>00:30:05.000 --&gt; 00:30:09.000
Modules here. Firstly,</p>
<p>00:30:09.000 --&gt; 00:30:13.000
Succession.pm is the main.</p>
<p>00:30:13.000 --&gt; 00:30:19.000
driver for the whole application.</p>
<p>00:30:19.000 --&gt; 00:30:24.000
Um, and as I mentioned earlier, we do a post to the.</p>
<p>00:30:24.000 --&gt; 00:30:29.000
MCP.</p>
<p>00:30:29.000 --&gt; 00:30:33.000
root and that executes this code.</p>
<p>00:30:33.000 --&gt; 00:30:37.000
We've got an MCP object, which we'll be looking at.</p>
<p>00:30:37.000 --&gt; 00:30:40.000
in a second.</p>
<p>00:30:40.000 --&gt; 00:30:42.000
And basically all it needs…</p>
<p>00:30:42.000 --&gt; 00:30:44.000
is the…</p>
<p>00:30:44.000 --&gt; 00:30:52.000
the tool file and we use path tiny to do clever things to get the tool file.</p>
<p>00:30:52.000 --&gt; 00:31:00.000
Uh, we already saw the code that gets the request body and works out whether it's a valid request.</p>
<p>00:31:00.000 --&gt; 00:31:02.000
We extract the ID and the method.</p>
<p>00:31:02.000 --&gt; 00:31:05.000
Um, if there's no…</p>
<p>00:31:05.000 --&gt; 00:31:13.000
if there's no ID, then something's gone wrong.</p>
<p>00:31:13.000 --&gt; 00:31:20.000
If we call the initialize method, as I said, this is hard-coded. Actually, let's look in MCP.</p>
<p>00:31:20.000 --&gt; 00:31:24.000
And here's the initialized data and it really is just hard coded.</p>
<p>00:31:24.000 --&gt; 00:31:27.000
of a hash.</p>
<p>00:31:27.000 --&gt; 00:31:37.000
Um, which basically I just copied from MCP specs.</p>
<p>00:31:37.000 --&gt; 00:31:45.000
If it's calling tools list,</p>
<p>00:31:45.000 --&gt; 00:31:47.000
That's, um…</p>
<p>00:31:47.000 --&gt; 00:31:51.000
Up here, I think.</p>
<p>00:31:51.000 --&gt; 00:31:54.000
Oh, no, calls tools.</p>
<p>00:31:54.000 --&gt; 00:32:02.000
But again, it just looks at the tools, which is the data that we've got from the YAML file.</p>
<p>00:32:02.000 --&gt; 00:32:05.000
runs a map that pulls out.</p>
<p>00:32:05.000 --&gt; 00:32:09.000
useful pieces of information.</p>
<p>00:32:09.000 --&gt; 00:32:12.000
Um.</p>
<p>00:32:12.000 --&gt; 00:32:15.000
But the more interesting one is</p>
<p>00:32:15.000 --&gt; 00:32:16.000
is cool.</p>
<p>00:32:16.000 --&gt; 00:32:18.000
All tour…</p>
<p>00:32:18.000 --&gt; 00:32:23.000
Which does a lot of the same kind of things.</p>
<p>00:32:23.000 --&gt; 00:32:24.000
Um, for the bike.</p>
<p>00:32:24.000 --&gt; 00:32:28.000
Basically, it needs to dispatch on the</p>
<p>00:32:28.000 --&gt; 00:32:32.000
name of the tool that you're trying to call.</p>
<p>00:32:32.000 --&gt; 00:32:36.000
Uh, so if the name is sovereign on date, it gets the sovereign on date.</p>
<p>00:32:36.000 --&gt; 00:32:43.000
It extracts various useful pieces of information.</p>
<p>00:32:43.000 --&gt; 00:32:45.000
Um.</p>
<p>00:32:45.000 --&gt; 00:32:48.000
Um, one.</p>
<p>00:32:48.000 --&gt; 00:32:54.000
Interesting thing to note here. So we've built up this.</p>
<p>00:32:54.000 --&gt; 00:32:55.000
hash</p>
<p>00:32:55.000 --&gt; 00:32:58.000
of all the interesting data.</p>
<p>00:32:58.000 --&gt; 00:33:03.000
Well, then we convert it to text.</p>
<p>00:33:03.000 --&gt; 00:33:06.000
And we return.</p>
<p>00:33:06.000 --&gt; 00:33:17.000
We've got this method called tool result, which actually builds the result that we need to return to the client. And we pass it both the data version.</p>
<p>00:33:17.000 --&gt; 00:33:19.000
and the textual version.</p>
<p>00:33:19.000 --&gt; 00:33:22.000
We'll look at that in a second, but…</p>
<p>00:33:22.000 --&gt; 00:33:26.000
The same thing is going on with the line of succession.</p>
<p>00:33:26.000 --&gt; 00:33:35.000
tool. We get the data, which again is just calling a method that I already had.</p>
<p>00:33:35.000 --&gt; 00:33:41.000
We can we convert it we sorry, we build a textual version.</p>
<p>00:33:41.000 --&gt; 00:33:47.000
of that line of succession, and then we call tool result, passing both</p>
<p>00:33:47.000 --&gt; 00:33:49.000
versions of the results.</p>
<p>00:33:49.000 --&gt; 00:33:54.000
Because if we go into Tool Results.</p>
<p>00:33:54.000 --&gt; 00:33:57.000
You see, it gets…</p>
<p>00:33:57.000 --&gt; 00:33:59.000
data and text.</p>
<p>00:33:59.000 --&gt; 00:34:09.000
Because it returns the text as content and the data as a thing called structured content.</p>
<p>00:34:09.000 --&gt; 00:34:16.000
So the LLM or whatever AI tool it is that's calling this.</p>
<p>00:34:16.000 --&gt; 00:34:22.000
back the data in two different…</p>
<p>00:34:22.000 --&gt; 00:34:33.000
formats, it gets a plain text that it can pass, because it's a clever AI tool, or it gets structured data, which it can pull apart and</p>
<p>00:34:33.000 --&gt; 00:34:42.000
Maybe get more useful information out of.</p>
<p>00:34:42.000 --&gt; 00:34:45.000
Yeah, so the adapter is…</p>
<p>00:34:45.000 --&gt; 00:34:49.000
uh, doing date passing, we saw that.</p>
<p>00:34:49.000 --&gt; 00:34:57.000
The default date is today. The default list size is 10.</p>
<p>00:34:57.000 --&gt; 00:35:04.000
Um, but because when I was showing you the actual website, you will see that</p>
<p>00:35:04.000 --&gt; 00:35:06.000
Um, .</p>
<p>00:35:06.000 --&gt; 00:35:09.000
We only store 30.</p>
<p>00:35:09.000 --&gt; 00:35:15.000
people's names for each date, and that's something that I'll want to expand later.</p>
<p>00:35:15.000 --&gt; 00:35:21.000
But currently, our maximum list size has to be 30 because that's all the data that I have.</p>
<p>00:35:21.000 --&gt; 00:35:26.000
So yes, this is just reiterating.</p>
<p>00:35:26.000 --&gt; 00:35:28.000
The response…</p>
<p>00:35:28.000 --&gt; 00:35:30.000
structure.</p>
<p>00:35:30.000 --&gt; 00:35:33.000
And as I said, we get…</p>
<p>00:35:33.000 --&gt; 00:35:35.000
Content.</p>
<p>00:35:35.000 --&gt; 00:35:38.000
And a textual version of it.</p>
<p>00:35:38.000 --&gt; 00:35:50.000
I guess there might be some other way, some other values you can put for the type here. I don't know. I haven</p>
<p>00:35:50.000 --&gt; 00:35:52.000
version, so that the…</p>
<p>00:35:52.000 --&gt; 00:35:58.000
the AI tool, can choose what it wants to do.</p>
<p>00:35:58.000 --&gt; 00:36:02.000
Which version of the data it finds most useful.</p>
<p>00:36:02.000 --&gt; 00:36:06.000
We need to deal with errors at two different levels.</p>
<p>00:36:06.000 --&gt; 00:36:14.000
JSON RPC has its own validation rules.</p>
<p>00:36:14.000 --&gt; 00:36:27.000
those long numbers, 32,000 minus 32,000 something, we need to deal with those in a way that's defined by the JSON RPC spec.</p>
<p>00:36:27.000 --&gt; 00:36:35.000
But also we have our own errors within the tool where we have to deal with.</p>
<p>00:36:35.000 --&gt; 00:36:45.000
past an invalid date or a tool that we don't know anything about, things like that.</p>
<p>00:36:45.000 --&gt; 00:36:47.000
Um, so, okay, we've written.</p>
<p>00:36:47.000 --&gt; 00:36:49.000
I…</p>
<p>00:36:49.000 --&gt; 00:36:51.000
MCP server.</p>
<p>00:36:51.000 --&gt; 00:36:55.000
We've incorporated it in our.</p>
<p>00:36:55.000 --&gt; 00:36:57.000
existing code.</p>
<p>00:36:57.000 --&gt; 00:37:01.000
How do we actually, um,</p>
<p>00:37:01.000 --&gt; 00:37:03.000
Get to use it.</p>
<p>00:37:03.000 --&gt; 00:37:10.000
Um, and there are a number of ways that we can use it. We can use curl.</p>
<p>00:37:10.000 --&gt; 00:37:14.000
Um, I saw that earlier this week.</p>
<p>00:37:14.000 --&gt; 00:37:29.000
Mohammed had released appMCP CLI to CPAN. I had a quick try with it and I couldn't get it to work with my MCP. I don't know whether that's me or him that's broken stuff.</p>
<p>00:37:29.000 --&gt; 00:37:43.000
Um, but that will… I mean, it was only version 0.01, so we'll see what happens with that. Or, and nice and easy is we can add the MCP to a</p>
<p>00:37:43.000 --&gt; 00:37:45.000
Chat interface.</p>
<p>00:37:45.000 --&gt; 00:37:49.000
Now let's have a look at some of these.</p>
<p>00:37:49.000 --&gt; 00:37:53.000
Examples.</p>
<p>00:37:53.000 --&gt; 00:37:57.000
I can never remember.</p>
<p>00:37:57.000 --&gt; 00:38:00.000
Uh, detailed…</p>
<p>00:38:00.000 --&gt; 00:38:02.000
Co. Come on.</p>
<p>00:38:02.000 --&gt; 00:38:04.000
bones.</p>
<p>00:38:04.000 --&gt; 00:38:07.000
So I've written a couple of</p>
<p>00:38:07.000 --&gt; 00:38:09.000
Little programs.</p>
<p>00:38:09.000 --&gt; 00:38:11.000
But cool.</p>
<p>00:38:11.000 --&gt; 00:38:14.000
My.</p>
<p>00:38:14.000 --&gt; 00:38:16.000
server.</p>
<p>00:38:16.000 --&gt; 00:38:21.000
This one calls the initialize method.</p>
<p>00:38:21.000 --&gt; 00:38:23.000
Here you can see the request.</p>
<p>00:38:23.000 --&gt; 00:38:26.000
.</p>
<p>00:38:26.000 --&gt; 00:38:30.000
Jason, that it builds up, calling the method initialize.</p>
<p>00:38:30.000 --&gt; 00:38:37.000
Just some information about the protocol version and stuff like that. And then it just passes that to curl.</p>
<p>00:38:37.000 --&gt; 00:38:43.000
with the correct content type and the correct accept.</p>
<p>00:38:43.000 --&gt; 00:38:46.000
And so if we run…</p>
<p>00:38:46.000 --&gt; 00:38:50.000
been initialized.</p>
<p>00:38:50.000 --&gt; 00:39:00.000
That's the result coming back from my live server.</p>
<p>00:39:00.000 --&gt; 00:39:03.000
Um, and as I said,</p>
<p>00:39:03.000 --&gt; 00:39:16.000
In my use case, we don't do anything useful at the initialized stage, but we still need to have it. I've given this a dash P so that we can see</p>
<p>00:39:16.000 --&gt; 00:39:22.000
Um, the payload that is passed into it.</p>
<p>00:39:22.000 --&gt; 00:39:25.000
And then the response that comes back.</p>
<p>00:39:25.000 --&gt; 00:39:33.000
Things get more interesting when you run.</p>
<p>00:39:33.000 --&gt; 00:39:40.000
Tools list.</p>
<p>00:39:40.000 --&gt; 00:39:46.000
Because you're getting back the list of the tools that we support.</p>
<p>00:39:46.000 --&gt; 00:39:47.000
Um.</p>
<p>00:39:47.000 --&gt; 00:39:52.000
There's a name sovereign on date. There's the description of it so that the…</p>
<p>00:39:52.000 --&gt; 00:39:59.000
LLM knows why it might call that. And here's the information about the.</p>
<p>00:39:59.000 --&gt; 00:40:01.000
Uh…</p>
<p>00:40:01.000 --&gt; 00:40:03.000
The format, the…</p>
<p>00:40:03.000 --&gt; 00:40:07.000
properties, so it accepts. And then down here we</p>
<p>00:40:07.000 --&gt; 00:40:08.000
have.</p>
<p>00:40:08.000 --&gt; 00:40:10.000
The line of succession.</p>
<p>00:40:10.000 --&gt; 00:40:12.000
One.</p>
<p>00:40:12.000 --&gt; 00:40:14.000
Um, and again,</p>
<p>00:40:14.000 --&gt; 00:40:20.000
And well, we saw this in the YAML, didn't we?</p>
<p>00:40:20.000 --&gt; 00:40:22.000
That it…</p>
<p>00:40:22.000 --&gt; 00:40:24.000
that its properties are date,</p>
<p>00:40:24.000 --&gt; 00:40:27.000
and limit.</p>
<p>00:40:27.000 --&gt; 00:40:31.000
And again, if I give it a dot</p>
<p>00:40:31.000 --&gt; 00:40:36.000
minus P.</p>
<p>00:40:36.000 --&gt; 00:40:39.000
So that's the call.</p>
<p>00:40:39.000 --&gt; 00:40:44.000
I've just given it a random number as an ID. Just…</p>
<p>00:40:44.000 --&gt; 00:40:46.000
Tools list and</p>
<p>00:40:46.000 --&gt; 00:40:47.000
gives me back.</p>
<p>00:40:47.000 --&gt; 00:40:50.000
The list of the tools.</p>
<p>00:40:50.000 --&gt; 00:40:59.000
And then, probably most interesting is what happens if we run tools.</p>
<p>00:40:59.000 --&gt; 00:41:00.000
Cool.</p>
<p>00:41:00.000 --&gt; 00:41:13.000
We need to give it at least the name of a tool. So we give it.</p>
<p>00:41:13.000 --&gt; 00:41:22.000
And now that's going to default to today, I think.</p>
<p>00:41:22.000 --&gt; 00:41:27.000
I'm sorry, yeah, here, so here you can see, as I said, we get the, we get a text version.</p>
<p>00:41:27.000 --&gt; 00:41:34.000
that return data and then we get a structured version.</p>
<p>00:41:34.000 --&gt; 00:41:38.000
And again, if we</p>
<p>00:41:38.000 --&gt; 00:41:40.000
minus P.</p>
<p>00:41:40.000 --&gt; 00:41:43.000
It shows us here the</p>
<p>00:41:43.000 --&gt; 00:41:48.000
cool that it has made, and there are no arguments in this version.</p>
<p>00:41:48.000 --&gt; 00:41:51.000
But we can again…</p>
<p>00:41:51.000 --&gt; 00:41:54.000
Also…</p>
<p>00:41:54.000 --&gt; 00:41:56.000
Give it.</p>
<p>00:41:56.000 --&gt; 00:42:02.000
This is where I have to type raw JSON.</p>
<p>00:42:02.000 --&gt; 00:42:06.000
Without making a mistake.</p>
<p>00:42:06.000 --&gt; 00:42:11.000
1948.</p>
<p>00:42:11.000 --&gt; 00:42:12.000
Stephanie.</p>
<p>00:42:12.000 --&gt; 00:42:15.000
for change</p>
<p>00:42:15.000 --&gt; 00:42:25.000
18.</p>
<p>00:42:25.000 --&gt; 00:42:27.000
Yeah, and now it's filled in.</p>
<p>00:42:27.000 --&gt; 00:42:30.000
State argument.</p>
<p>00:42:30.000 --&gt; 00:42:32.000
And it tells you that</p>
<p>00:42:32.000 --&gt; 00:42:35.000
George VI was the king.</p>
<p>00:42:35.000 --&gt; 00:42:41.000
And if we change this to…</p>
<p>00:42:41.000 --&gt; 00:42:42.000
9.</p>
<p>00:42:42.000 --&gt; 00:42:43.000
of…</p>
<p>00:42:43.000 --&gt; 00:42:45.000
Succession.</p>
<p>00:42:45.000 --&gt; 00:42:49.000
And we add a…</p>
<p>00:42:49.000 --&gt; 00:42:52.000
Limit.</p>
<p>00:42:52.000 --&gt; 00:42:54.000
Ray.</p>
<p>00:42:54.000 --&gt; 00:42:57.000
We will get the first</p>
<p>00:42:57.000 --&gt; 00:43:02.000
three names on the line of succession.</p>
<p>00:43:02.000 --&gt; 00:43:04.000
On that date.</p>
<p>00:43:04.000 --&gt; 00:43:09.000
And you'll see the text just has these ugly.</p>
<p>00:43:09.000 --&gt; 00:43:14.000
new lines, but the LLMs don't care about that.</p>
<p>00:43:14.000 --&gt; 00:43:17.000
And down here we've got the proper.</p>
<p>00:43:17.000 --&gt; 00:43:20.000
Uh, structured data.</p>
<p>00:43:20.000 --&gt; 00:43:22.000
for the…</p>
<p>00:43:22.000 --&gt; 00:43:27.000
Verse 3 people in the line of succession.</p>
<p>00:43:27.000 --&gt; 00:43:30.000
So, yeah, we can call it…</p>
<p>00:43:30.000 --&gt; 00:43:32.000
like this.</p>
<p>00:43:32.000 --&gt; 00:43:35.000
But probably…</p>
<p>00:43:35.000 --&gt; 00:43:37.000
Um,</p>
<p>00:43:37.000 --&gt; 00:43:39.000
Most interesting.</p>
<p>00:43:39.000 --&gt; 00:43:44.000
Uh, now here I have…</p>
<p>00:43:44.000 --&gt; 00:43:46.000
Claude?</p>
<p>00:43:46.000 --&gt; 00:43:50.000
And if you go to your…</p>
<p>00:43:50.000 --&gt; 00:43:54.000
Settings in Claw and select connectors.</p>
<p>00:43:54.000 --&gt; 00:44:02.000
Um, then you can look at the kind of tools that you've already got set up.</p>
<p>00:44:02.000 --&gt; 00:44:05.000
And we can add a custom connector.</p>
<p>00:44:05.000 --&gt; 00:44:08.000
Call it line of…</p>
<p>00:44:08.000 --&gt; 00:44:10.000
succession.</p>
<p>00:44:10.000 --&gt; 00:44:20.000
of it.</p>
<p>00:44:20.000 --&gt; 00:44:28.000
The correct URL.</p>
<p>00:44:28.000 --&gt; 00:44:35.000
Without a typo.</p>
<p>00:44:35.000 --&gt; 00:44:38.000
There's no sign-in for this, because it's just public information.</p>
<p>00:44:38.000 --&gt; 00:44:43.000
You've got the option to add new headers.</p>
<p>00:44:43.000 --&gt; 00:44:47.000
So we add that.</p>
<p>00:44:47.000 --&gt; 00:44:50.000
So now we've got a new connector.</p>
<p>00:44:50.000 --&gt; 00:44:55.000
Listed, line of succession.</p>
<p>00:44:55.000 --&gt; 00:44:59.000
If we…</p>
<p>00:44:59.000 --&gt; 00:45:01.000
Who's that?</p>
<p>00:45:01.000 --&gt; 00:45:06.000
and go to A.</p>
<p>00:45:06.000 --&gt; 00:45:25.000
chat window, we can we can ask it.</p>
<p>00:45:25.000 --&gt; 00:45:28.000
And you see it's using…</p>
<p>00:45:28.000 --&gt; 00:45:31.000
of succession sovereign on date.</p>
<p>00:45:31.000 --&gt; 00:45:35.000
It's told us that</p>
<p>00:45:35.000 --&gt; 00:45:47.000
Queen Elizabeth, Elizabeth II, which is correct. Uh, and it's also grabbed some more information. This doesn't come from my tool.</p>
<p>00:45:47.000 --&gt; 00:45:52.000
So it's mixed in some of its own knowledge.</p>
<p>00:45:52.000 --&gt; 00:45:59.000
And we can also go.</p>
<p>00:45:59.000 --&gt; 00:46:00.000
Tell me the…</p>
<p>00:46:00.000 --&gt; 00:46:02.000
Top 10 people.</p>
<p>00:46:02.000 --&gt; 00:46:06.000
people on the.</p>
<p>00:46:06.000 --&gt; 00:46:15.000
Well, I know session on</p>
<p>00:46:15.000 --&gt; 00:46:20.000
6th of Feb 1952, which I just happened to just happen.</p>
<p>00:46:20.000 --&gt; 00:46:23.000
happen to know is the date that Queen Elizabeth II.</p>
<p>00:46:23.000 --&gt; 00:46:26.000
to the throne.</p>
<p>00:46:26.000 --&gt; 00:46:34.000
And again, it's loading my tool.</p>
<p>00:46:34.000 --&gt; 00:46:40.000
And there are the names of the people. Now, I mean…</p>
<p>00:46:40.000 --&gt; 00:46:46.000
Not that maybe you're interested, but it's interesting for me to note that it's got.</p>
<p>00:46:46.000 --&gt; 00:46:54.000
It caused Prince Charles, the Duke of Cornwall, because that's the title that he held on that day because he hadn't been made Prince of Wales yet.</p>
<p>00:46:54.000 --&gt; 00:46:56.000
Um.</p>
<p>00:46:56.000 --&gt; 00:47:04.000
So yes, it's relatively easy to.</p>
<p>00:47:04.000 --&gt; 00:47:14.000
add a connection to my MCP into your Claude chat. You can do exactly the same thing in a.</p>
<p>00:47:14.000 --&gt; 00:47:20.000
ChatGPT chat, and I'm sure whatever you use.</p>
<p>00:47:20.000 --&gt; 00:47:30.000
Brock or whatever the meta one's called or Gemini.</p>
<p>00:47:30.000 --&gt; 00:47:35.000
Oh, right, yeah, so here's just an example.</p>
<p>00:47:35.000 --&gt; 00:47:39.000
Uh, you add it.</p>
<p>00:47:39.000 --&gt; 00:47:49.000
Um, so I was going to do a demo of a complete round trip.</p>
<p>00:47:49.000 --&gt; 00:47:51.000
I mean, we…</p>
<p>00:47:51.000 --&gt; 00:47:56.000
We've pretty much done this anyway.</p>
<p>00:47:56.000 --&gt; 00:47:59.000
Oh, so there's the line of succession.</p>
<p>00:47:59.000 --&gt; 00:48:04.000
On the 14th of November.</p>
<p>00:48:04.000 --&gt; 00:48:14.000
1948, but that's not a random day, that's the day that Prince Charles was born. And so we've got Princess Elizabeth, the Queen.</p>
<p>00:48:14.000 --&gt; 00:48:20.000
Charles and Princess Margaret and it says:</p>
<p>00:48:20.000 --&gt; 00:48:29.000
Compare the answer with the website.</p>
<p>00:48:29.000 --&gt; 00:48:33.000
The date that Charles was born.</p>
<p>00:48:33.000 --&gt; 00:48:35.000
And there's the first three names.</p>
<p>00:48:35.000 --&gt; 00:48:43.000
Miss Elizabeth, Prince Charles, Princess Mahal. Now, that shouldn't as a surprise, because as I've been</p>
<p>00:48:43.000 --&gt; 00:48:46.000
At great pains to point out, the</p>
<p>00:48:46.000 --&gt; 00:48:51.000
Data comes from exactly the same place. It comes from cooling exactly the same.</p>
<p>00:48:51.000 --&gt; 00:48:56.000
methods.</p>
<p>00:48:56.000 --&gt; 00:48:58.000
Um,</p>
<p>00:48:58.000 --&gt; 00:49:07.000
So we can also do compare the first five successors on these two dates.</p>
<p>00:49:07.000 --&gt; 00:49:14.000
Once you've typed one of these JSONs, it's easy enough to.</p>
<p>00:49:14.000 --&gt; 00:49:16.000
Edit it to type other ones.</p>
<p>00:49:16.000 --&gt; 00:49:24.000
Uh, what was February 7th.</p>
<p>00:49:24.000 --&gt; 00:49:26.000
Five people.</p>
<p>00:49:26.000 --&gt; 00:49:31.000
white people.</p>
<p>00:49:31.000 --&gt; 00:49:35.000
Prince Charles, Princess Anne.</p>
<p>00:49:35.000 --&gt; 00:49:42.000
Princess Margaret and then the Duke of Gloucester and Prince William of Gloucester.</p>
<p>00:49:42.000 --&gt; 00:49:46.000
And then we've got the textual version.</p>
<p>00:49:46.000 --&gt; 00:49:48.000
And then it says…</p>
<p>00:49:48.000 --&gt; 00:49:56.000
Compare it with the 9th of September. Oh, so that it's chosen those two dates.</p>
<p>00:49:56.000 --&gt; 00:50:00.000
Because they are the first and last dates of…</p>
<p>00:50:00.000 --&gt; 00:50:03.000
Elizabeth's seconds.</p>
<p>00:50:03.000 --&gt; 00:50:11.000
Rain. You're not interested in that, are you?</p>
<p>00:50:11.000 --&gt; 00:50:15.000
Oh, and there I've got an error because I've got the date format wrong.</p>
<p>00:50:15.000 --&gt; 00:50:20.000
Because 00 is not valid.</p>
<p>00:50:20.000 --&gt; 00:50:24.000
Day of the month.</p>
<p>00:50:24.000 --&gt; 00:50:26.000
And there you have…</p>
<p>00:50:26.000 --&gt; 00:50:28.000
Prince William.</p>
<p>00:50:28.000 --&gt; 00:50:32.000
Prince George, Princess Charlotte, Prince Louis.</p>
<p>00:50:32.000 --&gt; 00:50:34.000
and Prince Henry, Prince Harry.</p>
<p>00:50:34.000 --&gt; 00:50:40.000
He's obviously better known.</p>
<p>00:50:40.000 --&gt; 00:50:54.000
Okay, so that was pretty much all I had to tell you. That's what made it straightforward was the fact that I got a domain model. If there's one lesson that you should take away from this.</p>
<p>00:50:54.000 --&gt; 00:50:58.000
having a domain model is cool.</p>
<p>00:50:58.000 --&gt; 00:51:09.000
Uh, so the tool definitions describe the kind of useful questions that you might want to ask, and then the adapter translates those requests and turns them into.</p>
<p>00:51:09.000 --&gt; 00:51:12.000
into calls to the model.</p>
<p>00:51:12.000 --&gt; 00:51:14.000
already exist.</p>
<p>00:51:14.000 --&gt; 00:51:27.000
Some things that I might want to do to it next, most importantly, I realize that there's probably modules there on CPAM which handle the JSON RPC stuff for me.</p>
<p>00:51:27.000 --&gt; 00:51:34.000
Whereas I'm writing it all myself from hand, by hand.</p>
<p>00:51:34.000 --&gt; 00:51:40.000
Maybe I'll add some more tools, I'm not entirely sure what they'd be, but maybe people would find other.</p>
<p>00:51:40.000 --&gt; 00:51:46.000
of information useful.</p>
<p>00:51:46.000 --&gt; 00:52:03.000
I showed you writing up a connection to Claude. There's another layer above that that you can do in both ChatGPT and Claude. You can wrap it up in a plugin, which makes it just even easier for people that</p>
<p>00:52:03.000 --&gt; 00:52:13.000
Don't really understand what a URL is. They don't need to have that, have a look at that slightly scary looking setup.</p>
<p>00:52:13.000 --&gt; 00:52:14.000
uh, dial…</p>
<p>00:52:14.000 --&gt; 00:52:16.000
lockbox.</p>
<p>00:52:16.000 --&gt; 00:52:19.000
Uh, and then there's, um, I'm…</p>
<p>00:52:19.000 --&gt; 00:52:27.000
I'm starting to wonder whether there's a way to write a dancer to plug in that</p>
<p>00:52:27.000 --&gt; 00:52:38.000
does all the top-level scaffolding and just calls to callback functions to actually do the working out what the data is.</p>
<p>00:52:38.000 --&gt; 00:52:41.000
I haven't really started thinking about that, but it's just…</p>
<p>00:52:41.000 --&gt; 00:52:44.000
at the back of my mind.</p>
<p>00:52:44.000 --&gt; 00:52:47.000
Um, so, in summary,</p>
<p>00:52:47.000 --&gt; 00:52:53.000
watching existing models make writing new interfaces much easier.</p>
<p>00:52:53.000 --&gt; 00:52:58.000
Write useful tools to give the assistants a reason to call.</p>
<p>00:52:58.000 --&gt; 00:53:08.000
And the MCP standardizes discovery and invocation and makes it easy to</p>
<p>00:53:08.000 --&gt; 00:53:12.000
put it on top of your existing model.</p>
<p>00:53:12.000 --&gt; 00:53:17.000
We'll go to questions, uh…</p>
<p>00:53:17.000 --&gt; 00:53:20.000
But some resources, so that's where the…</p>
<p>00:53:20.000 --&gt; 00:53:29.000
where the MCP actually lives, the code for the whole website, including the MCP is on GitHub.</p>
<p>00:53:29.000 --&gt; 00:53:36.000
And I wrote a blog post about it back in May when I first wrote the</p>
<p>00:53:36.000 --&gt; 00:53:41.000
start the MCP so that you might find that interesting too.</p>
<p>00:53:41.000 --&gt; 00:53:46.000
Um, how about that? That was just under…</p>
<p>00:53:46.000 --&gt; 00:53:47.000
An hour.</p>
<p>00:53:47.000 --&gt; 00:53:55.000
So I can't see any Zoom stuff.</p>
<p>00:53:55.000 --&gt; 00:53:56.000
Oh, there you go.</p>
<p>00:53:56.000 --&gt; 00:54:04.000
So Dave, that was. That's that was an excellent.</p>
<p>00:54:04.000 --&gt; 00:54:05.000
I can see, questions.</p>
<p>00:54:05.000 --&gt; 00:54:06.000
presentation. Thank you very much. There are, I think even I have.</p>
<p>00:54:06.000 --&gt; 00:54:14.000
I have some questions and there are some questions in the chat, so I'm going to read you the questions so you don't have to open the</p>
<p>00:54:14.000 --&gt; 00:54:23.000
window, the first came in a while ago. Do you put any AI scraping denial on your website?</p>
<p>00:54:23.000 --&gt; 00:54:28.000
Um.</p>
<p>00:54:28.000 --&gt; 00:54:36.000
Over the last year, when it's come round to renew all of my domains and I have far too many domains.</p>
<p>00:54:36.000 --&gt; 00:54:37.000
I, uh…</p>
<p>00:54:37.000 --&gt; 00:54:41.000
have been moving all my domains to Cloudflare.</p>
<p>00:54:41.000 --&gt; 00:54:56.000
And that's part of their standard, um, offering, the standard service that they offer as your onboarding a domain, they ask you what the setting is, what setting you want to put for</p>
<p>00:54:56.000 --&gt; 00:55:04.000
AI scrapers. Now, I know that.</p>
<p>00:55:04.000 --&gt; 00:55:11.000
Even just in the Pearl community, we've had a lot of problems with.</p>
<p>00:55:11.000 --&gt; 00:55:17.000
AI scrapers bringing websites down. I think Pearl Mugs has had that problem.</p>
<p>00:55:17.000 --&gt; 00:55:20.000
Um, and…</p>
<p>00:55:20.000 --&gt; 00:55:23.000
CPAN testers as well.</p>
<p>00:55:23.000 --&gt; 00:55:25.000
But…</p>
<p>00:55:25.000 --&gt; 00:55:28.000
My websites never get</p>
<p>00:55:28.000 --&gt; 00:55:30.000
Hardly any traffic.</p>
<p>00:55:30.000 --&gt; 00:55:34.000
Um, so, and I think given that…</p>
<p>00:55:34.000 --&gt; 00:55:38.000
I'm a big fan of using AI to.</p>
<p>00:55:38.000 --&gt; 00:55:49.000
Extract information from websites. It would be slightly hypocritical of me to stop other people from doing it on my websites. So, generally, I.</p>
<p>00:55:49.000 --&gt; 00:55:51.000
um, allow.</p>
<p>00:55:51.000 --&gt; 00:55:56.000
AI scrapers, access to most of my websites.</p>
<p>00:55:56.000 --&gt; 00:56:04.000
But I am monitoring that. If it causes a problem, then obviously I will take action.</p>
<p>00:56:04.000 --&gt; 00:56:10.000
Okay.</p>
<p>00:56:10.000 --&gt; 00:56:11.000
Um.</p>
<p>00:56:11.000 --&gt; 00:56:14.000
The MCP server side, do you have any rate limiting in place such as maximum number of requests per second?</p>
<p>00:56:14.000 --&gt; 00:56:19.000
Same as the previous answer, I guess.</p>
<p>00:56:19.000 --&gt; 00:56:22.000
I get, uh…</p>
<p>00:56:22.000 --&gt; 00:56:28.000
My most popular website is the line of succession website.</p>
<p>00:56:28.000 --&gt; 00:56:30.000
I get…</p>
<p>00:56:30.000 --&gt; 00:56:37.000
A few thousand hits on that every day, so that's not troubling the server in the slightest.</p>
<p>00:56:37.000 --&gt; 00:56:40.000
Uh…</p>
<p>00:56:40.000 --&gt; 00:56:47.000
If I can be slightly stereotypical, I think my main</p>
<p>00:56:47.000 --&gt; 00:56:55.000
My main visitor archetype on that website is middle age.</p>
<p>00:56:55.000 --&gt; 00:57:08.000
American women who are interested in the British royal family. I don't know how much use they're going to be making of the MCP. So I haven't looked at…</p>
<p>00:57:08.000 --&gt; 00:57:18.000
Rate limiting it yet. It's only been live a couple of months and it's caused no problems whatsoever. But again, something that I will monitor.</p>
<p>00:57:18.000 --&gt; 00:57:22.000
Is it being used? Can you see that if it's being used?</p>
<p>00:57:22.000 --&gt; 00:57:23.000
To be honest, I haven't…</p>
<p>00:57:23.000 --&gt; 00:57:25.000
by others, except of you.</p>
<p>00:57:25.000 --&gt; 00:57:31.000
Uh, I haven't looked at that. I haven't, um, the, the whole, um.</p>
<p>00:57:31.000 --&gt; 00:57:44.000
The whole system is hosted in Cloud Run, Google Cloud Run. So yes, I need to look at I need to set up a report that shows me how.</p>
<p>00:57:44.000 --&gt; 00:57:48.000
how often the MCP is being caught, and I haven't done that.</p>
<p>00:57:48.000 --&gt; 00:57:54.000
How would people even know about the fact that you have an MCP server?</p>
<p>00:57:54.000 --&gt; 00:57:56.000
Um…</p>
<p>00:57:56.000 --&gt; 00:57:59.000
Well, it's advertised at the.</p>
<p>00:57:59.000 --&gt; 00:58:03.000
Oh, we're on the wrong.</p>
<p>00:58:03.000 --&gt; 00:58:07.000
Wrong, wrong, wrong, don't don't show. Yeah, private chats and things.</p>
<p>00:58:07.000 --&gt; 00:58:10.000
No.</p>
<p>00:58:10.000 --&gt; 00:58:15.000
Hang on.</p>
<p>00:58:15.000 --&gt; 00:58:20.000
No, no, no, shut that down.</p>
<p>00:58:20.000 --&gt; 00:58:27.000
Yeah.</p>
<p>00:58:27.000 --&gt; 00:58:33.000
This should get me back to where I want to be.</p>
<p>00:58:33.000 --&gt; 00:58:35.000
Yeah, sorry.</p>
<p>00:58:35.000 --&gt; 00:58:43.000
Sorry, what was the question? Oh, how do people know? Oh, they know because</p>
<p>00:58:43.000 --&gt; 00:58:44.000
of the enemy.</p>
<p>00:58:44.000 --&gt; 00:58:56.000
I mean, it's on the slash MCP route. Okay, but</p>
<p>00:58:56.000 --&gt; 00:58:57.000
Mm-hmm.</p>
<p>00:58:57.000 --&gt; 00:58:58.000
I mean, there's a tiny link to it in the footer. So I haven't made a big song and dance of it. I have a line of succession blog.</p>
<p>00:58:58.000 --&gt; 00:59:06.000
And I haven't even posted to it there because I don't think people are particularly going to be interested. It was an experiment for me to find out how</p>
<p>00:59:06.000 --&gt; 00:59:11.000
easy it is to to do it more than anything.</p>
<p>00:59:11.000 --&gt; 00:59:24.000
Yeah, I think it was more from me, it was more a little bit of theoretical question or generic question of how anyone would know about an MCP server.</p>
<p>00:59:24.000 --&gt; 00:59:27.000
Oh, actually, um, there is…</p>
<p>00:59:27.000 --&gt; 00:59:29.000
of a random website.</p>
<p>00:59:29.000 --&gt; 00:59:38.000
Yeah, when I first set it up back in May, there are a couple of GitHub repos that list.</p>
<p>00:59:38.000 --&gt; 00:59:50.000
But the power GitHub Pages websites that list MCP servers. So I've included it on there, but those are lists of hundreds of MTP servers.</p>
<p>00:59:50.000 --&gt; 00:59:54.000
I don't know whether anybody would have found it through that.</p>
<p>00:59:54.000 --&gt; 00:59:55.000
Yeah, so I know.</p>
<p>00:59:55.000 --&gt; 01:00:03.000
You're right, I do have to set up a report to find out how used it's going to be or it's being.</p>
<p>01:00:03.000 --&gt; 01:00:16.000
Yeah, so there is another question which is probably theoretical for not really relevant for you, but interesting in general. If a request takes 5 min to respond.</p>
<p>01:00:16.000 --&gt; 01:00:21.000
How does one maintain the context of the conversation?</p>
<p>01:00:21.000 --&gt; 01:00:25.000
Um…</p>
<p>01:00:25.000 --&gt; 01:00:30.000
It's an interesting question. Like you say, for me, it's hypothetical, because</p>
<p>01:00:30.000 --&gt; 01:00:33.000
my requests all come back in…</p>
<p>01:00:33.000 --&gt; 01:00:37.000
A few seconds.</p>
<p>01:00:37.000 --&gt; 01:00:38.000
Um…</p>
<p>01:00:38.000 --&gt; 01:00:39.000
Okay.</p>
<p>01:00:39.000 --&gt; 01:00:40.000
I mean, the ID would probably help.</p>
<p>01:00:40.000 --&gt; 01:00:45.000
there, but…</p>
<p>01:00:45.000 --&gt; 01:00:47.000
I don't…</p>
<p>01:00:47.000 --&gt; 01:00:53.000
I don't think the concept of a conversation really exists at this level.</p>
<p>01:00:53.000 --&gt; 01:00:57.000
The MCP is really answering one-off questions.</p>
<p>01:00:57.000 --&gt; 01:01:01.000
the sovereign on this date.</p>
<p>01:01:01.000 --&gt; 01:01:11.000
You don't, it doesn't have the concept of then saying, okay, and who was on the line of succession on the same day?</p>
<p>01:01:11.000 --&gt; 01:01:13.000
That doesn't happen.</p>
<p>01:01:13.000 --&gt; 01:01:14.000
Yeah, I mean.</p>
<p>01:01:14.000 --&gt; 01:01:23.000
It would be up to the LLM or the AI client to hold that context and know that it's.</p>
<p>01:01:23.000 --&gt; 01:01:25.000
Is it?</p>
<p>01:01:25.000 --&gt; 01:01:31.000
It's like you've got a fining cabinet. You don't expect the filing cabinet to…</p>
<p>01:01:31.000 --&gt; 01:01:40.000
remember which file you got out last time and give you the next file. It's just a dumb</p>
<p>01:01:40.000 --&gt; 01:01:46.000
a dumb information store.</p>
<p>01:01:46.000 --&gt; 01:01:48.000
Yeah.</p>
<p>01:01:48.000 --&gt; 01:01:50.000
There was also question what is slug?</p>
<p>01:01:50.000 --&gt; 01:01:55.000
Oh, so that's being asked because…</p>
<p>01:01:55.000 --&gt; 01:02:00.000
Um, we get back slugs for every person.</p>
<p>01:02:00.000 --&gt; 01:02:02.000
Oh, okay, I didn't even notice that one. Yeah.</p>
<p>01:02:02.000 --&gt; 01:02:06.000
Um, and a slug is, uh,</p>
<p>01:02:06.000 --&gt; 01:02:09.000
the unique identifier for</p>
<p>01:02:09.000 --&gt; 01:02:14.000
the person on the website. If you</p>
<p>01:02:14.000 --&gt; 01:02:19.000
If we look at the website,</p>
<p>01:02:19.000 --&gt; 01:02:25.000
Not only are the dates all links, but the…</p>
<p>01:02:25.000 --&gt; 01:02:32.000
names are all links as well, and if you… I don't know whether anyone can see, but if you look up here.</p>
<p>01:02:32.000 --&gt; 01:02:39.000
The URL for a person page is P followed by the slug.</p>
<p>01:02:39.000 --&gt; 01:02:40.000
Okay.</p>
<p>01:02:40.000 --&gt; 01:02:45.000
So it's just a unique identifier for the page. And probably.</p>
<p>01:02:45.000 --&gt; 01:02:55.000
Good API design would be to not return the slug, but to return the URL for the person.</p>
<p>01:02:55.000 --&gt; 01:02:57.000
Yeah.</p>
<p>01:02:57.000 --&gt; 01:03:07.000
So here's another question which I think, okay, whatever.</p>
<p>01:03:07.000 --&gt; 01:03:08.000
Yes.</p>
<p>01:03:08.000 --&gt; 01:03:18.000
Not related to your presentation, I think, but it's very interesting. Is Pearl an easy language for AI to master in your view? Have you tried Claude to implement line of suction?</p>
<p>01:03:18.000 --&gt; 01:03:29.000
The line of succession website in Dancer 2 on its own, without looking at your code or looking it up on the internet.</p>
<p>01:03:29.000 --&gt; 01:03:42.000
The thing is, that's the question. My comment here is that how would you even be able to do that, to tell.</p>
<p>01:03:42.000 --&gt; 01:03:43.000
Well, I mean…</p>
<p>01:03:43.000 --&gt; 01:03:50.000
Claude, or whoever, whatever, not to look at an existing one or not look at your existing one.</p>
<p>01:03:50.000 --&gt; 01:04:00.000
I'm… I'm not about to throw away almost 10 years of work and replace it with vibe coding, but…</p>
<p>01:04:00.000 --&gt; 01:04:06.000
I…</p>
<p>01:04:06.000 --&gt; 01:04:08.000
I would say over the last…</p>
<p>01:04:08.000 --&gt; 01:04:14.000
Couple of years, the amount of code that I actually write myself has fallen.</p>
<p>01:04:14.000 --&gt; 01:04:19.000
fallen dramatically. I probably now write</p>
<p>01:04:19.000 --&gt; 01:04:27.000
less than 5% of the code that I produce.</p>
<p>01:04:27.000 --&gt; 01:04:28.000
Yeah.</p>
<p>01:04:28.000 --&gt; 01:04:29.000
So,</p>
<p>01:04:29.000 --&gt; 01:04:34.000
I'm… I'm not… well, I have tried vibe coding.</p>
<p>01:04:34.000 --&gt; 01:04:41.000
But having got 30 years of experience of programming,</p>
<p>01:04:41.000 --&gt; 01:04:44.000
Why?</p>
<p>01:04:44.000 --&gt; 01:04:46.000
I'm happy to get…</p>
<p>01:04:46.000 --&gt; 01:04:51.000
Claude or Codex to generate code for me.</p>
<p>01:04:51.000 --&gt; 01:04:52.000
Um,</p>
<p>01:04:52.000 --&gt; 01:04:57.000
But I like to read it. I like to understand what it is that I'm…</p>
<p>01:04:57.000 --&gt; 01:05:03.000
put in live or uploading to CPAN or whatever. But if you've looked at code that I've written.</p>
<p>01:05:03.000 --&gt; 01:05:08.000
Over the last two years probably, there is…</p>
<p>01:05:08.000 --&gt; 01:05:15.000
Uh, only 20% and falling chance that it was actually written by</p>
<p>01:05:15.000 --&gt; 01:05:19.000
me. Most of it would have been written by</p>
<p>01:05:19.000 --&gt; 01:05:22.000
an agent.</p>
<p>01:05:22.000 --&gt; 01:05:23.000
Hmm.</p>
<p>01:05:23.000 --&gt; 01:05:33.000
Does that… I don't know whether that answers the question at all. I think Pearl is a perfectly easy eight, like, perfectly easy language for AIs to master.</p>
<p>01:05:33.000 --&gt; 01:05:36.000
I sometimes have problems.</p>
<p>01:05:36.000 --&gt; 01:05:38.000
Um, I have</p>
<p>01:05:38.000 --&gt; 01:05:39.000
So…</p>
<p>01:05:39.000 --&gt; 01:05:44.000
Keep in mind it that there are…</p>
<p>01:05:44.000 --&gt; 01:05:50.000
modern Pearl con constructs, but once you put that</p>
<p>01:05:50.000 --&gt; 01:05:53.000
the agent file.</p>
<p>01:05:53.000 --&gt; 01:05:57.000
For a particular project, it knows that you want to use</p>
<p>01:05:57.000 --&gt; 01:06:09.000
signature and postfix dereferencing and things like that, but left to its own devices.</p>
<p>01:06:09.000 --&gt; 01:06:15.000
It would often write something that looks like it came from 1995.</p>
<p>01:06:15.000 --&gt; 01:06:19.000
Yeah, that's good. Yeah, that's a problem too.</p>
<p>01:06:19.000 --&gt; 01:06:26.000
Okay, you also need to write it, please write code without bugs.</p>
<p>01:06:26.000 --&gt; 01:06:27.000
Like</p>
<p>01:06:27.000 --&gt; 01:06:30.000
Yes, but I mean, one of the first experiments that</p>
<p>01:06:30.000 --&gt; 01:06:35.000
did with AI coding and I wrote a blog post about it, it's probably four years ago now.</p>
<p>01:06:35.000 --&gt; 01:06:42.000
And I thought I'd be really clever, and I would… and I asked it to write a…</p>
<p>01:06:42.000 --&gt; 01:06:45.000
Um, oppose…</p>
<p>01:06:45.000 --&gt; 01:06:47.000
Earth's CPAN module for…</p>
<p>01:06:47.000 --&gt; 01:06:57.000
interfacing with the OpenAI API, like a wrapper, you know, so Curtis now.</p>
<p>01:06:57.000 --&gt; 01:07:08.000
maintains a really complex module that does that, but I thought I'd be one of the first person on CPAN. And it wrote me code.</p>
<p>01:07:08.000 --&gt; 01:07:12.000
That just it didn't come, it didn't even compile.</p>
<p>01:07:12.000 --&gt; 01:07:17.000
Yeah.</p>
<p>01:07:17.000 --&gt; 01:07:18.000
Yeah.</p>
<p>01:07:18.000 --&gt; 01:07:22.000
But that's four years ago and we've come an awful long way since then. I think I'm perfectly happy to trust most of my coding.</p>
<p>01:07:22.000 --&gt; 01:07:23.000
agent.</p>
<p>01:07:23.000 --&gt; 01:07:28.000
It happened to… it happened to me two days ago on ChatGPT with Python.</p>
<p>01:07:28.000 --&gt; 01:07:34.000
that it wrote some code, and that it has a button now on ChatGPT to run it.</p>
<p>01:07:34.000 --&gt; 01:07:51.000
And it failed to run it on ChatGPT. The code was actually good. And when I moved it to correctly set up machine, it ran and did exactly what I was expecting to do. But it's their own environment couldn't handle it.</p>
<p>01:07:51.000 --&gt; 01:07:52.000
Yes, yes, I mean.</p>
<p>01:07:52.000 --&gt; 01:07:54.000
So it seems really strange things.</p>
<p>01:07:54.000 --&gt; 01:08:01.000
What I'm… I mean, I'm… a lot of what I write is,</p>
<p>01:08:01.000 --&gt; 01:08:11.000
web stuff, and I'm fine, I'm getting a lot braver with JavaScript than I used to be. I mean, I'd learnt.</p>
<p>01:08:11.000 --&gt; 01:08:24.000
JavaScript over the last 10 years or so, but I've never been particularly confident in it. But now I just asked Claude to go away and write the JavaScript to do this clever thing on my web.</p>
<p>01:08:24.000 --&gt; 01:08:29.000
And it mostly works most of the time.</p>
<p>01:08:29.000 --&gt; 01:08:30.000
Very happy.</p>
<p>01:08:30.000 --&gt; 01:08:31.000
Okay.</p>
<p>01:08:31.000 --&gt; 01:08:51.000
Another comment is just a command that Michael says that my website biology database has been brought down by AI escapers.</p>
<p>01:08:51.000 --&gt; 01:08:52.000
Mountbatten Windsor.</p>
<p>01:08:52.000 --&gt; 01:08:55.000
Scrapers as well, then someone, Mark asks, and I'm going to mispronounce this name, Andrew Mountbutton visor still listed as number eight in the line of succession question.</p>
<p>01:08:55.000 --&gt; 01:09:09.000
Yes, and that is accurate. I mean, let's not get into the politics of what's been going on with Andrew Mountbatten-Windsor over the last year.</p>
<p>01:09:09.000 --&gt; 01:09:14.000
But His Royal.</p>
<p>01:09:14.000 --&gt; 01:09:22.000
privileges have slowly been chipped away at over the last.</p>
<p>01:09:22.000 --&gt; 01:09:34.000
Well, five years, because his mother started it. She said he wasn't going to be a working royal. She said he couldn't be an HRH anymore, but it took until when his.</p>
<p>01:09:34.000 --&gt; 01:09:37.000
Brother.</p>
<p>01:09:37.000 --&gt; 01:09:51.000
became king and the police raid that happened about a year ago, at which point he stopped being a prince, he stopped being referred to as the Duke of York,</p>
<p>01:09:51.000 --&gt; 01:10:04.000
The last thing that he still has is that he's on the line of succession. But the point there is that if you're eighth on the line of succession,</p>
<p>01:10:04.000 --&gt; 01:10:07.000
Um, you're not going to become king.</p>
<p>01:10:07.000 --&gt; 01:10:12.000
Uh, because…</p>
<p>01:10:12.000 --&gt; 01:10:25.000
Five of the people above you are young children who are going to grow up and have children of their own, and they will all be higher than you in the… every time that one of William or Harry's children</p>
<p>01:10:25.000 --&gt; 01:10:29.000
a child with their own, Andrew will move down another level.</p>
<p>01:10:29.000 --&gt; 01:10:37.000
He's never going to be king. And in order to remove him from the line of succession, it has to be an act of parliament.</p>
<p>01:10:37.000 --&gt; 01:10:41.000
And it has to be an act of Parliament that is ratified by all</p>
<p>01:10:41.000 --&gt; 01:10:47.000
All of the countries that use the British line of succession for their monarchs.</p>
<p>01:10:47.000 --&gt; 01:10:59.000
So it needs to be ratified by the Australian Parliament, the New Zealand Parliament, the Canadian Parliament. There are 14 other countries. And honestly.</p>
<p>01:10:59.000 --&gt; 01:11:07.000
It's just not worth the parliamentary time. I would personally far rather that my… that the Parliament spent</p>
<p>01:11:07.000 --&gt; 01:11:12.000
their time doing much more useful things than</p>
<p>01:11:12.000 --&gt; 01:11:15.000
Yeah, okay.</p>
<p>01:11:15.000 --&gt; 01:11:16.000
Yeah. Okay.</p>
<p>01:11:16.000 --&gt; 01:11:19.000
being anchor from the line of succession. Sorry, that was too long for a let's get back to technical things.</p>
<p>01:11:19.000 --&gt; 01:11:31.000
Yeah, yeah, yeah. A possible way to tell AI readers that a website has MCP functionality is to add it to the slash dot well known.</p>
<p>01:11:31.000 --&gt; 01:11:37.000
or slash MCP dash server.</p>
<p>01:11:37.000 --&gt; 01:11:38.000
I, I mean…</p>
<p>01:11:38.000 --&gt; 01:11:39.000
file, I guess.</p>
<p>01:11:39.000 --&gt; 01:11:40.000
The only time I…</p>
<p>01:11:40.000 --&gt; 01:11:48.000
And wait a second, sorry. These are just conventions, like having slash feeds at the website root. Okay.</p>
<p>01:11:48.000 --&gt; 01:11:49.000
Um, I…</p>
<p>01:11:49.000 --&gt; 01:12:02.000
I'm absolutely sure that that's all true. The only time I've ever used dot well known as it's part of the.</p>
<p>01:12:02.000 --&gt; 01:12:12.000
Let's encrypt automatic.</p>
<p>01:12:12.000 --&gt; 01:12:17.000
Yeah.</p>
<p>01:12:17.000 --&gt; 01:12:18.000
Yeah, yeah.</p>
<p>01:12:18.000 --&gt; 01:12:20.000
certificate renewal. I didn't know that there were other uses for it. I would be fascinated to hear more about that. Someone write a blog post and I'll read it.</p>
<p>01:12:20.000 --&gt; 01:12:21.000
Okay.</p>
<p>01:12:21.000 --&gt; 01:12:33.000
Um, similar for my pro development, I've had good success with ChatGPT and Claude for generating Perl code. And recently implemented a local.</p>
<p>01:12:33.000 --&gt; 01:12:48.000
So when QWEN, I don't know what that is based RUG pipeline that has REG, if my pronunciation doesn't work, pipeline that has access to our legacy code base.</p>
<p>01:12:48.000 --&gt; 01:13:04.000
That required quite a lot, quite a bit of custom code to get the relationships just right as three sitter Python library most turnkey solution use. But okay, doesn't quite.</p>
<p>01:13:04.000 --&gt; 01:13:12.000
Understand paragraph enough. Use the custom PPI-based processor to get the parsing right.</p>
<p>01:13:12.000 --&gt; 01:13:14.000
Okay, so that was mostly just a comment. I don't know if…</p>
<p>01:13:14.000 --&gt; 01:13:22.000
Yes, I do have a comment I'd like to push in at this point that</p>
<p>01:13:22.000 --&gt; 01:13:31.000
Obviously, the coding that I'm doing is just mostly me and my websites, me and my personal.</p>
<p>01:13:31.000 --&gt; 01:13:37.000
projects, I care about quality.</p>
<p>01:13:37.000 --&gt; 01:13:52.000
But I'm not putting production code into situations where people are going to lose millions of dollars or it's going to put people's lives in danger. Obviously, if you're…</p>
<p>01:13:52.000 --&gt; 01:13:58.000
working in a system that has more important effects.</p>
<p>01:13:58.000 --&gt; 01:14:05.000
And you're going to need to have a lot more important.</p>
<p>01:14:05.000 --&gt; 01:14:16.000
rules in place in order to make sure that the code that you put live is doing the right thing. And there are a couple of things that I would love you to.</p>
<p>01:14:16.000 --&gt; 01:14:28.000
investigate Curtis Poe, who you probably all know as a well-known Pell programmer, has a…</p>
<p>01:14:28.000 --&gt; 01:14:36.000
A project that he calls PAD, that's P-A-A-D. Oh, I see someone's already mentioning it.</p>
<p>01:14:36.000 --&gt; 01:14:38.000
.</p>
<p>01:14:38.000 --&gt; 01:14:50.000
in the chat as a series of skills for your agent to</p>
<p>01:14:50.000 --&gt; 01:14:51.000
Work.</p>
<p>01:14:51.000 --&gt; 01:14:59.000
I guess the idea is it makes them work more how a real programmer works.</p>
<p>01:14:59.000 --&gt; 01:15:06.000
Um, so that's well worth looking at. Um, the other thing, and also from somebody who used to be really, um,</p>
<p>01:15:06.000 --&gt; 01:15:14.000
Uh, big in the Pearl community is Jesse Vincent. Uh, he used to be the pumpkin back in 5.</p>
<p>01:15:14.000 --&gt; 01:15:17.000
0.10 or something like that.</p>
<p>01:15:17.000 --&gt; 01:15:22.000
When he has a project on GitHub called Superpowers.</p>
<p>01:15:22.000 --&gt; 01:15:27.000
Which adds a lot of software engineering.</p>
<p>01:15:27.000 --&gt; 01:15:43.000
I'm not going to say magic because it's engineering, but software engineering power to your agents and the models. So PAD and superpowers, both from people who have been big in the Perl world.</p>
<p>01:15:43.000 --&gt; 01:15:49.000
some time, but two of the.</p>
<p>01:15:49.000 --&gt; 01:15:53.000
Most popular, uh,</p>
<p>01:15:53.000 --&gt; 01:15:59.000
agentic programming add-ons around at the moment. I think I can't</p>
<p>01:15:59.000 --&gt; 01:16:14.000
remember the exact number, but Jesse recently, I saw him post somewhere that superpowers had reached something like the top 20 most starred projects on GitHub of all time.</p>
<p>01:16:14.000 --&gt; 01:16:17.000
So people like these tools. Well worth looking at.</p>
<p>01:16:17.000 --&gt; 01:16:21.000
Yeah, I heard about it. I didn't realize that's him. Okay.</p>
<p>01:16:21.000 --&gt; 01:16:38.000
Oh, and yeah, so Scott was talking about how it's working in his company. There was a interview that Jesse Vincent was interviewed by Tim O'Reilly.</p>
<p>01:16:38.000 --&gt; 01:16:39.000
Hmm.</p>
<p>01:16:39.000 --&gt; 01:16:49.000
It's an O'Reilly thing, so you should be able to find it on YouTube just by googling their names. And it's, it was in the last two or three weeks.</p>
<p>01:16:49.000 --&gt; 01:16:54.000
Uh, and Tim was asking him about how.</p>
<p>01:16:54.000 --&gt; 01:16:58.000
Yes, he uses agents in his.</p>
<p>01:16:58.000 --&gt; 01:17:06.000
company. And Jesse has one of these people. He's taken the approach of they actually have</p>
<p>01:17:06.000 --&gt; 01:17:16.000
AIs who are employees of the company. They are they are colleagues, they are non-human colleagues working on the project as full.</p>
<p>01:17:16.000 --&gt; 01:17:29.000
participants in the…</p>
<p>01:17:29.000 --&gt; 01:17:30.000
Yeah.</p>
<p>01:17:30.000 --&gt; 01:17:31.000
projects, and it's very interesting the way that they've been doing that. So I recommend that interview to you all.</p>
<p>01:17:31.000 --&gt; 01:17:44.000
That's fascinating. Next comment here. I use cloud code agent a lot nowadays. I have the same problems, but telling Claude isn't enough. You need harness engineering.</p>
<p>01:17:44.000 --&gt; 01:17:54.000
as this poor critic with lots of custom rules. For example, do not use evil, use try catch.</p>
<p>01:17:54.000 --&gt; 01:17:55.000
Yeah, yeah.</p>
<p>01:17:55.000 --&gt; 01:17:57.000
The file has used V5.40.</p>
<p>01:17:57.000 --&gt; 01:18:02.000
I think that's the same thing that I'm saying. I mean, yes.</p>
<p>01:18:02.000 --&gt; 01:18:09.000
the agent to use Pearl Critic is a really good start.</p>
<p>01:18:09.000 --&gt; 01:18:10.000
Yeah.</p>
<p>01:18:10.000 --&gt; 01:18:16.000
Looking into Pad and superpowers takes it to the next level or three levels up.</p>
<p>01:18:16.000 --&gt; 01:18:23.000
Yeah, I mean, I probably tell the agent first to write the test that uses per critic.</p>
<p>01:18:23.000 --&gt; 01:18:28.000
And then also tell it to also run those tests.</p>
<p>01:18:28.000 --&gt; 01:18:29.000
Oh</p>
<p>01:18:29.000 --&gt; 01:18:31.000
Yes, yes. I mean, I think,</p>
<p>01:18:31.000 --&gt; 01:18:33.000
the…</p>
<p>01:18:33.000 --&gt; 01:18:44.000
Getting into, uh, AI-driven programming is at the very least a really good reason to bring back test-driven.</p>
<p>01:18:44.000 --&gt; 01:18:45.000
programming.</p>
<p>01:18:45.000 --&gt; 01:18:53.000
Yeah, yeah, yeah. Knowing JavaScript is hard, is very hard. Okay.</p>
<p>01:18:53.000 --&gt; 01:19:08.000
Models have no issues writing Perl code. Both cloud models available through APIs like Anthropic Cloud or even local ones, my locally running Ornit.</p>
<p>01:19:08.000 --&gt; 01:19:23.000
5 and later teal coder, write Pearl that is correct and works just fine. Regarding the tools slash extensions slash skills, I found Curtis Pose.</p>
<p>01:19:23.000 --&gt; 01:19:30.000
God, okay, that was you mentioned earlier, really useful as well as ThoughtWorks.</p>
<p>01:19:30.000 --&gt; 01:19:34.000
SPDD.</p>
<p>01:19:34.000 --&gt; 01:19:42.000
I don't know, SPDD, but that's obviously, yes, something else along the same lines as superpowers.</p>
<p>01:19:42.000 --&gt; 01:19:49.000
Okay, uh, thank you, I will bounce out, but greatly appreciate the teachings.</p>
<p>01:19:49.000 --&gt; 01:19:55.000
I forget to say that I put all those pro-critic tests into GitHooks. Yeah.</p>
<p>01:19:55.000 --&gt; 01:19:57.000
Yeah.</p>
<p>01:19:57.000 --&gt; 01:19:59.000
Okay…</p>
<p>01:19:59.000 --&gt; 01:20:03.000
And I think I don't know. Oh, there is one more now. Event.</p>
<p>01:20:03.000 --&gt; 01:20:08.000
And even this one is broken for me. Oh, uh…</p>
<p>01:20:08.000 --&gt; 01:20:09.000
Yeah, GitHooks.</p>
<p>01:20:09.000 --&gt; 01:20:12.000
Sorry.</p>
<p>01:20:12.000 --&gt; 01:20:15.000
Ah, okay.</p>
<p>01:20:15.000 --&gt; 01:20:23.000
Only Git hooks are 100% safe and can prevent Claude from repeating its mistakes. Okay, yeah, sure.</p>
<p>01:20:23.000 --&gt; 01:20:25.000
Yeah, uh…</p>
<p>01:20:25.000 --&gt; 01:20:36.000
GitHooks, maybe, or definitely running tests and having all these things in the test, whether.</p>
<p>01:20:36.000 --&gt; 01:20:47.000
for the client, for the agent, or during the agent running, or after it, it's always a good idea, or definitely after it is a good idea to protect yourself from everything.</p>
<p>01:20:47.000 --&gt; 01:20:49.000
Definitely, yeah, yeah.</p>
<p>01:20:49.000 --&gt; 01:20:54.000
I mean, I have…</p>
<p>01:20:54.000 --&gt; 01:21:01.000
I have little time for the people who say,</p>
<p>01:21:01.000 --&gt; 01:21:08.000
You shouldn't write. You shouldn't use AI to write your code because it's just going to be.</p>
<p>01:21:08.000 --&gt; 01:21:15.000
rubbish and stolen from everybody else because I just think it's a useful tool.</p>
<p>01:21:15.000 --&gt; 01:21:19.000
Anyone that thinks it's rubbish hasn't tried it in the last two years.</p>
<p>01:21:19.000 --&gt; 01:21:26.000
But equally, I don't buy the people who say that.</p>
<p>01:21:26.000 --&gt; 01:21:33.000
programmers are all going to be out of a job by the end of next year because I think at the moment,</p>
<p>01:21:33.000 --&gt; 01:21:34.000
Um,</p>
<p>01:21:34.000 --&gt; 01:21:36.000
People.</p>
<p>01:21:36.000 --&gt; 01:21:40.000
You need to have the experience that we all have.</p>
<p>01:21:40.000 --&gt; 01:21:43.000
Um, in order to understand.</p>
<p>01:21:43.000 --&gt; 01:21:47.000
How bad the code is or how good or bad the code is.</p>
<p>01:21:47.000 --&gt; 01:21:59.000
The code is every week I hear a horror story about someone that vibe coded an app that they put on the Apple Store and then got.</p>
<p>01:21:59.000 --&gt; 01:22:02.000
annoyed because…</p>
<p>01:22:02.000 --&gt; 01:22:11.000
Three days later, it got popular and their server melted because they had no clue about scaling.</p>
<p>01:22:11.000 --&gt; 01:22:12.000
Yeah.</p>
<p>01:22:12.000 --&gt; 01:22:26.000
So, I think programmers are going to be needed for a while, but on the other hand, I am also quite glad that I'm at the end of my career and I consider myself semi-retired and I don't need to have a job as a programmer.</p>
<p>01:22:26.000 --&gt; 01:22:28.000
Yeah.</p>
<p>01:22:28.000 --&gt; 01:22:35.000
Okay, it's one other comment we need agent. We need an agent that was originally was.</p>
<p>01:22:35.000 --&gt; 01:22:38.000
trained to write pure code. And I</p>
<p>01:22:38.000 --&gt; 01:22:40.000
Yeah.</p>
<p>01:22:40.000 --&gt; 01:22:47.000
Will Brushwell was working on something like that.</p>
<p>01:22:47.000 --&gt; 01:22:48.000
That as you like.</p>
<p>01:22:48.000 --&gt; 01:22:50.000
Okay. I have written…</p>
<p>01:22:50.000 --&gt; 01:22:58.000
I have written a few custom MCP servers for our systems here, but they have been via</p>
<p>01:22:58.000 --&gt; 01:23:15.000
God is Python scripts. However, one is connected to our testing pipeline, which uses Loki and Mimir to track failing tests and running module usage by our CI pipelines.</p>
<p>01:23:15.000 --&gt; 01:23:25.000
In addition, I have one that tracks source commits, subversion is neat because it has it.</p>
<p>01:23:25.000 --&gt; 01:23:34.000
We ask what's changed when the test started failing.</p>
<p>01:23:34.000 --&gt; 01:23:35.000
Yeah.</p>
<p>01:23:35.000 --&gt; 01:23:38.000
It also allows for us to run ad hoc CI tests on code changes during the day.</p>
<p>01:23:38.000 --&gt; 01:23:39.000
Okay.</p>
<p>01:23:39.000 --&gt; 01:23:44.000
Yeah, I mean, I feel like I should point out that</p>
<p>01:23:44.000 --&gt; 01:24:00.000
Gabor thought he wanted a talk on MCP, and so he invited me because he'd read my blog post. I said, I don't know that I'm the right person because I don't really know very much about MCP. And he came back and said, well.</p>
<p>01:24:00.000 --&gt; 01:24:11.000
You know more than anybody else that I know, so that's why I was talked into it. So, maybe I am the Pearl Communities</p>
<p>01:24:11.000 --&gt; 01:24:27.000
Expert on MCP at the moment, but I'm certainly not the Pearl Community's expert on agentic.</p>
<p>01:24:27.000 --&gt; 01:24:28.000
Yeah.</p>
<p>01:24:28.000 --&gt; 01:24:35.000
programming for that, you really should see if you can get Jesse or Curtis to give one of these talks.</p>
<p>01:24:35.000 --&gt; 01:24:36.000
I do know that, um…</p>
<p>01:24:36.000 --&gt; 01:24:38.000
That's a good idea. I'll ask them, and maybe we'll have a session with them. 2 sessions with them.</p>
<p>01:24:38.000 --&gt; 01:24:44.000
If I can do a small plug, I do know that, uh…</p>
<p>01:24:44.000 --&gt; 01:24:51.000
Curtis is giving a talk at the London Pearl Workshop, which is a month today on the 21st of November.</p>
<p>01:24:51.000 --&gt; 01:24:54.000
Um, and, um…</p>
<p>01:24:54.000 --&gt; 01:24:58.000
That will definitely be on.</p>
<p>01:24:58.000 --&gt; 01:25:01.000
AI programming.</p>
<p>01:25:01.000 --&gt; 01:25:02.000
So that will be worth…</p>
<p>01:25:02.000 --&gt; 01:25:03.000
Thank you.</p>
<p>01:25:03.000 --&gt; 01:25:04.000
That's excellent. So go to London.</p>
<p>01:25:04.000 --&gt; 01:25:09.000
If anyone can get to London for the day, I recommend it.</p>
<p>01:25:09.000 --&gt; 01:25:22.000
Uh, excellent.</p>
<p>01:25:22.000 --&gt; 01:25:23.000
Yeah, yeah.</p>
<p>01:25:23.000 --&gt; 01:25:24.000
.</p>
<p>01:25:24.000 --&gt; 01:25:31.000
Okay, I think it seems that we ran out of questions. I hope that you ran out of questions, because we need to finish at one point this session and actually, if people want to stay around, they are welcome, and then we can keep having the conversation.</p>
<p>01:25:31.000 --&gt; 01:25:39.000
I got that in real time so people are going to speak and so on. So I'm…</p>
<p>01:25:39.000 --&gt; 01:25:43.000
I would like to thank you again, really.</p>
<p>01:25:43.000 --&gt; 01:26:01.000
Okay, so really thank you for this presentation and all the responses. And I would like to thank also to the people who participated and asked questions or didn't ask questions.</p>
<p>01:26:01.000 --&gt; 01:26:16.000
adjuster here and listened. It was excellent. And if someone is watching on YouTube, then please click on the like button and follow the channel and below the video you will find the link to</p>
<p>01:26:16.000 --&gt; 01:26:35.000
Some notes about this session, and I think and to Dave Cross, of course, there is a web page and low profiles, and maybe also to the slide. The slides, we can add them, maybe.</p>
<p>01:26:35.000 --&gt; 01:26:36.000
Yeah.</p>
<p>01:26:36.000 --&gt; 01:26:46.000
Yeah, I'll get the slides up somewhere very soon. Um, I've just put my email address in the chat. It's not hard to guess, it's dave at pearlhacks.com. PearlHacks is where I blog about Pearl. Um, I'm happy to answer any questions.</p>
<p>01:26:46.000 --&gt; 01:26:50.000
email if anybody.</p>
<p>01:26:50.000 --&gt; 01:26:51.000
Yeah.</p>
<p>01:26:51.000 --&gt; 01:26:52.000
Once we get in touch.</p>
<p>01:26:52.000 --&gt; 01:26:53.000
And thinks I can help.</p>
<p>01:26:53.000 --&gt; 01:27:08.000
Thank you very much. And and again, if you're watching the video and you don't you will find the link to all these things below the video. There will be a link, and then you can find that information there. So thank you very much again. Now, I'm trying to click on the stop record.</p>
<p>01:27:08.000 --&gt; 01:27:22.000
But my computer has issues, so maybe it won't work. So again, thank you very much and see you at the next event.</p>
]]></content>
    <author>
      <name></name>
    </author>
  </entry>

  <entry>
    <title>Everyday date and time handling in Perl with T</title>
    <summary type="html"><![CDATA[]]></summary>
    <updated>2026-10-18T20:00:02Z</updated>
    <pubDate>2026-10-18T20:00:02Z</pubDate>
    <link rel="alternate" type="text/html" href="https://perlmaven.com/everyday-date-and-time-handling-in-perl-with-t" />
    <id>https://perlmaven.com/everyday-date-and-time-handling-in-perl-with-t</id>
    <content type="html"><![CDATA[<p>Common date operations often need only a small amount of code. This talk introduces T, a compact wrapper around DateTime, through practical examples: parsing dates, formatting output, finding the start of a day or month, and adding months across different month lengths.
I'll explain its conventions and where it can make application code simpler.</p>
<h2 class="title is-4">Bio</h2>
<p><a href="https://www.linkedin.com/in/konkove/">Eugen Konkov</a> is a Perl developer and the author of <a href="https://metacpan.org/release/KES/App-Ground-0.01_08/view/lib/T.pm">App::Ground</a> and the <a href="https://metacpan.org/pod/DB::Hooks">DB::Hooks</a> debugger. He enjoys building practical tools that simplify application development and debugging.</p>
<h2 class="title is-4">Length</h2>
<p>20 minutes</p>
<p><a class="button is-primary" href="https://luma.com/2d09kkk4">register</a></p>
]]></content>
    <author>
      <name></name>
    </author>
  </entry>

  <entry>
    <title>Async, Type-Safe, and Secure: Perl&#39;s Answer to FastAPI</title>
    <summary type="html"><![CDATA[]]></summary>
    <updated>2026-09-08T09:00:02Z</updated>
    <pubDate>2026-09-08T09:00:02Z</pubDate>
    <link rel="alternate" type="text/html" href="https://perlmaven.com/async-type-safe-and-secure-perls-answer-to-fastapi" />
    <id>https://perlmaven.com/async-type-safe-and-secure-perls-answer-to-fastapi</id>
    <content type="html"><![CDATA[<h2 class="title is-4">Description</h2>
<p>This is a practical exploration of PAGI::FastAPI and its latest addition PAGI::FastAPI::Security that introduces you to modern asynchronous Perl web development if you have been using FastAPI in Python asking yourself why this can't be done in Perl. (Spoiler: it can now)</p>
<h2 class="title is-4">Bio</h2>
<p><a href="https://www.linkedin.com/in/mohammadanwar/">Mohammad Sajid Anwar</a> is a CPAN author and White Camel award recipient, recognised for his sustained contributions to the Perl community. He is the author of &quot;Design Patterns in Modern Perl&quot; and the creator of &quot;The Weekly Challenge&quot;, a long-running initiative since 2019. He is an editor of the Perl Weekly newsletter. He speaks regularly at Perl conferences and is an active mentor and contributor across the CPAN ecosystem.</p>
<h2 class="title is-4">Length</h2>
<p>30 min</p>
<iframe width="560" height="315" src="https://www.youtube.com/embed/uWkalm3XIW0" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>
<h2 class="title is-4">Participants Geo</h2>
<p>David is a bit of geo-nerd so he collected the places that people joined from:</p>
<p>Ukraine (Kiev), Stockholm, UK (London &amp; Norfolk), USA (New York, Minneapolis, Chicago, Lansing &amp; Miami), Netherlands, Israel (Haifa &amp; Modiin), Dublin, Barcelona, Munich, Hungary (Budapest), Germany and Nigeria (Lagos)!</p>
<h2 class="title is-4">Questions and comments</h2>
<ul>
<li>
<p>Is PAGI or PAGI::FastAPI reverse proxy aware? Like PAGI talking HTTP to HAProxy and HAProxy talks to clients over HTTPS</p>
</li>
<li>
<p>How do I customise the automated docs? E.g. I want to add a description or request examples.</p>
</li>
<li>
<p>What about nested data validation? A flaw in using Type::Tiny for schema validation is that there isn’t a way to model &quot;presence&quot; (afaik, I could be wrong though).</p>
</li>
<li>
<p>I was a huge fan of Data::FormValidator (back in the day) :-)</p>
</li>
<li>
<p>Is event loop an internal detail? Can the program hook to it to wait for other events, e.g. file system?</p>
<ul>
<li>Yes, you can hook into IO::Async::Loop, but it doesn't happen automatically, you would have to use a filesystem module designed to work with IO::Async::Loop.</li>
<li>You need a loop to be async, when you make db/file system calls you can create a promise but that promise lives in the servers event loop (or should to be efficient async) Most async modules have a loop parameter.</li>
<li>This is why Mojo:Pg, Mojo::mysql, etc, were created. Because most things in Perl aren't asynchronous, you have to recreate everything to become async AND because there isn't a single standard event loop you have to design them to work with specific loops (e.g., IO::Async::Loop, Mojo::IOLoop, etc).</li>
</ul>
</li>
<li>
<p>Next to authentication, what about authorization and audit (AAA)?</p>
</li>
<li>
<p>Does PAGI or PAGI::FastAPI allow 'under' like Mojolicous?</p>
</li>
<li>
<p>I wanted to try it right now but unfortunately it's using Perl 5.38 and my system has 5.34. But definitely will try. I dont think its a big issue 🙂</p>
</li>
<li>
<p>Thank you Mohammad. This has been very informative. And thank you for the Weekly Challenge. I have learned much from them.</p>
</li>
<li>
<p>It encourages us to move upwards faster!</p>
</li>
<li>
<p>Very cool Mohammad!</p>
</li>
<li>
<p>Thank you Mohammad. Great work!</p>
</li>
<li>
<p>Thank you, Mohammad! Great thing!</p>
</li>
<li>
<p>Thank you</p>
</li>
<li>
<p>Nice work, Mohammad. Many thanks.</p>
</li>
<li>
<p>Thanks!</p>
</li>
<li>
<p>Mohammad Anwar:	Thank you everyone</p>
</li>
</ul>
<h2 class="title is-4">Transcript</h2>
<p>WEBVTT</p>
<p>1
00:00:00.000 --&gt; 00:00:02.600
Mohammad Anwar: Hi everyone, this is Mohammad. Being recorded.</p>
<p>2
00:00:03.030 --&gt; 00:00:18.229
Gabor Szabo: Okay, so hi everyone. My name is Gabor Szabo. Welcome to the Code Maven channel, if you're watching on YouTube, and to the Perl Maven subsection of it, if you're watching live.</p>
<p>3
00:00:18.380 --&gt; 00:00:30.690
Gabor Szabo: Thank you for joining. It's absolutely great to have so many people interested in this topic, and thank you, Mohammad, for agreeing to giving this presentation.</p>
<p>4
00:00:30.690 --&gt; 00:00:41.350
Gabor Szabo: As I said also earlier, the advantage of being here is that you can ask questions in the chat, and we had a nice</p>
<p>5
00:00:41.350 --&gt; 00:00:53.630
Gabor Szabo: mutual introduction section before, and after the video, we stop the video recording, people can stay around, so next time, those people who are watching the video now, please join the…</p>
<p>6
00:00:53.630 --&gt; 00:01:03.060
Gabor Szabo: the next event… the upcoming events. You can find below the video, you will find a link to the upcoming events, and also for notes</p>
<p>7
00:01:03.060 --&gt; 00:01:13.760
Gabor Szabo: about this event, so check that out. With that said, I think I should welcome Mohammad again, and give you the</p>
<p>8
00:01:13.760 --&gt; 00:01:15.530
Gabor Szabo: stage.</p>
<p>9
00:01:17.030 --&gt; 00:01:20.620
Mohammad Anwar: Thank you, Gabor. Thank you for the opportunity, and…</p>
<p>10
00:01:21.910 --&gt; 00:01:25.369
Mohammad Anwar: Do I need to share my screen first?</p>
<p>11
00:01:29.020 --&gt; 00:01:33.609
Gabor Szabo: You can share the screen, you can introduce yourself as, in any order you like.</p>
<p>12
00:01:34.790 --&gt; 00:01:35.810
Mohammad Anwar: Hi, good.</p>
<p>13
00:01:44.200 --&gt; 00:01:51.699
Gabor Szabo: So while Mohammad is looking for the share, it's usually at the bottom, it's a… But,</p>
<p>14
00:01:51.700 --&gt; 00:01:53.060
Mohammad Anwar: Yeah, I see ya.</p>
<p>15
00:01:53.060 --&gt; 00:01:53.460
Gabor Szabo: Yeah.</p>
<p>16
00:01:53.540 --&gt; 00:01:55.000
Mohammad Anwar: So if you have a…</p>
<p>17
00:01:55.000 --&gt; 00:02:04.940
Gabor Szabo: all kinds of other events, and that's what I mentioned, both in Perl and in other languages, about other languages, so you can find all those sessions.</p>
<p>18
00:02:10.749 --&gt; 00:02:11.299
Mohammad Anwar: Into…</p>
<p>19
00:02:18.210 --&gt; 00:02:21.779
Gabor Szabo: Okay, I can see you now, I can see myself now in the screen.</p>
<p>20
00:02:22.230 --&gt; 00:02:24.530
Mohammad Anwar: So, let me get this.</p>
<p>21
00:02:24.680 --&gt; 00:02:25.800
Gabor Szabo: Yeah, okay.</p>
<p>22
00:02:26.030 --&gt; 00:02:28.549
Mohammad Anwar: Alright, so, let's start this.</p>
<p>23
00:02:30.270 --&gt; 00:02:31.050
Mohammad Anwar: But…</p>
<p>24
00:02:31.670 --&gt; 00:02:38.339
Mohammad Anwar: Thing is, I'm not able to see anything, anybody, but it's alright. You guys can see my screen, right?</p>
<p>25
00:02:38.680 --&gt; 00:02:42.110
Gabor Szabo: We can see your screen, what we'll cover, and…</p>
<p>26
00:02:42.430 --&gt; 00:02:44.660
Gabor Szabo: If you really want, we can see you as well.</p>
<p>27
00:02:44.660 --&gt; 00:02:45.540
Mohammad Anwar: Okay.</p>
<p>28
00:02:45.810 --&gt; 00:02:47.879
Mohammad Anwar: So, yeah, thank you, everybody.</p>
<p>29
00:02:48.040 --&gt; 00:02:57.430
Mohammad Anwar: for… Joining this session, and… Just to give a… the… the background, how and…</p>
<p>30
00:02:57.620 --&gt; 00:03:01.630
Mohammad Anwar: how I started into this PHIE Forest API.</p>
<p>31
00:03:02.150 --&gt; 00:03:02.939
Mohammad Anwar: And, I don't know.</p>
<p>32
00:03:02.940 --&gt; 00:03:09.679
Gabor Szabo: Sorry, Mohammad, there is a note at the top of the screen. You are sharing your entire screen.</p>
<p>33
00:03:10.210 --&gt; 00:03:10.830
Gabor Szabo: Okay.</p>
<p>34
00:03:10.830 --&gt; 00:03:11.360
Mohammad Anwar: Yay.</p>
<p>35
00:03:11.360 --&gt; 00:03:12.550
Gabor Szabo: Can you move that?</p>
<p>36
00:03:12.880 --&gt; 00:03:17.709
Gabor Szabo: Maybe you can click on the minus sign and it will hopefully disappear.</p>
<p>37
00:03:25.120 --&gt; 00:03:26.050
Gabor Szabo: Can you see it?</p>
<p>38
00:03:27.240 --&gt; 00:03:29.650
Mohammad Anwar: I don't see a money sign anywhere.</p>
<p>39
00:03:30.060 --&gt; 00:03:39.590
Gabor Szabo: Okay, well, I'll… it's not a problem right now, so go ahead, and then I'll tell you if it hides something on the screen, okay?</p>
<p>40
00:03:39.740 --&gt; 00:03:40.989
Mohammad Anwar: Okay, fair enough.</p>
<p>41
00:03:42.420 --&gt; 00:03:49.290
Mohammad Anwar: So, the whole idea for this… web framework was. Before…</p>
<p>42
00:03:50.320 --&gt; 00:03:59.690
Mohammad Anwar: this, I was mostly into Donset 2, so whenever I had to build a web framework, I would just go… go to Donset 2, and my…</p>
<p>43
00:03:59.840 --&gt; 00:04:12.540
Mohammad Anwar: job is done. It's… it's… it's quite easy to get… get a site up and running in no time, so… so when I… when I started working on, I believe, a couple of months, a few months ago, on</p>
<p>44
00:04:12.850 --&gt; 00:04:15.499
Mohammad Anwar: DBIX class async.</p>
<p>45
00:04:15.660 --&gt; 00:04:18.500
Mohammad Anwar: And I got into this whole async business.</p>
<p>46
00:04:19.550 --&gt; 00:04:28.600
Mohammad Anwar: And I… every time I looked into my web application, I thought, what if I can turn this into a synchronous web framework?</p>
<p>47
00:04:29.420 --&gt; 00:04:41.370
Mohammad Anwar: And I've been thinking about doing this, and then when somebody introduced me about the Python Fast API, I thought, wow, this is what I should be working on next, after my…</p>
<p>48
00:04:42.210 --&gt; 00:04:50.680
Mohammad Anwar: DBIC async, project. So, even though I'm not, a Python developer, I…</p>
<p>49
00:04:51.190 --&gt; 00:04:59.590
Mohammad Anwar: I know a little bit of Python, I can read Python, I can… but I'm not an expert in Python, but I still want to do</p>
<p>50
00:05:00.050 --&gt; 00:05:08.699
Mohammad Anwar: understand what Fast API is doing, and how I can build in, in my Perl site, port it into Perl.</p>
<p>51
00:05:08.880 --&gt; 00:05:09.830
Mohammad Anwar: So…</p>
<p>52
00:05:09.940 --&gt; 00:05:21.680
Mohammad Anwar: Before that, I was… I had a little bit, like, introduction of PAGI. I'm sure you guys have known what is a synchronous Gateway Interface.</p>
<p>53
00:05:22.330 --&gt; 00:05:29.349
Mohammad Anwar: And the guy who created this specification page is specification, John Napierogosi.</p>
<p>54
00:05:30.420 --&gt; 00:05:38.690
Mohammad Anwar: I had a quick chat with him, and he kind of introduced me. He kind of guided me about the whole.</p>
<p>55
00:05:38.840 --&gt; 00:05:47.380
Mohammad Anwar: specification, and how I can use that as a… as a foundation for my, this fast API port.</p>
<p>56
00:05:47.830 --&gt; 00:05:53.140
Mohammad Anwar: two points, so… so the whole… web framework is…</p>
<p>57
00:05:53.370 --&gt; 00:06:05.300
Mohammad Anwar: is based on… is a foundation on paging. So everything is… be, like, an asynchronous form using paging specifications, so… so that's where it all started, and…</p>
<p>58
00:06:06.510 --&gt; 00:06:13.530
Mohammad Anwar: Even though it… from the feature point of view, I think I have covered almost everything that</p>
<p>59
00:06:14.000 --&gt; 00:06:27.039
Mohammad Anwar: a Python Fast API has, but may not be complete. So, I must have just touched the surface, but not implemented everything that you find in Python FastAPI. So, probably you… if you know</p>
<p>60
00:06:27.110 --&gt; 00:06:34.600
Mohammad Anwar: Python faster, you can probably tell me, okay, what bit is missing, and I probably… and maybe I next… next time, I'll try to…</p>
<p>61
00:06:34.930 --&gt; 00:06:36.509
Mohammad Anwar: Fill the gap, gap.</p>
<p>62
00:06:36.790 --&gt; 00:06:40.549
Mohammad Anwar: So, in this presentation, probably, I'm gonna go through</p>
<p>63
00:06:40.990 --&gt; 00:06:48.630
Mohammad Anwar: this four-part session. First is going to be the foundation, where I'm gonna go through from the…</p>
<p>64
00:06:49.020 --&gt; 00:06:54.580
Mohammad Anwar: Beginning from 0 to… Where we have now, and then we're gonna meet</p>
<p>65
00:06:54.770 --&gt; 00:07:00.630
Mohammad Anwar: with my web framework, where I'm going to show you the basic,</p>
<p>66
00:07:00.950 --&gt; 00:07:04.709
Mohammad Anwar: Routing and everything, and all the dependency injections, and</p>
<p>67
00:07:05.060 --&gt; 00:07:10.190
Mohammad Anwar: And all other web frameworks, common web framework features, and all things.</p>
<p>68
00:07:11.340 --&gt; 00:07:17.469
Mohammad Anwar: And one thing that really… got me into this. It was this security,</p>
<p>69
00:07:17.650 --&gt; 00:07:28.190
Mohammad Anwar: features, security schemes that I had to build because FastAPI has those kind of schemes. So those… those are the interesting things that I'm going to show… share with you.</p>
<p>70
00:07:28.860 --&gt; 00:07:34.810
Mohammad Anwar: And, yeah. So, let's start with the first… So…</p>
<p>71
00:07:37.410 --&gt; 00:07:46.270
Mohammad Anwar: So, basically, so we start with the framework. I'm sure you all know what The framework is… is… Basically.</p>
<p>72
00:07:48.080 --&gt; 00:07:50.889
Mohammad Anwar: You, you get a brother send a request.</p>
<p>73
00:07:51.940 --&gt; 00:07:56.629
Mohammad Anwar: And then somebody accepts those requests and do something, and then you get a result back.</p>
<p>74
00:07:56.790 --&gt; 00:08:00.750
Mohammad Anwar: So this… something in between is your web framework.</p>
<p>75
00:08:01.180 --&gt; 00:08:05.720
Mohammad Anwar: So, this particular web framework, where…</p>
<p>76
00:08:06.380 --&gt; 00:08:12.110
Mohammad Anwar: We are gonna… we… we're gonna deal… work with it. So, basically.</p>
<p>77
00:08:18.020 --&gt; 00:08:18.880
Mohammad Anwar: Bear with me.</p>
<p>78
00:08:23.900 --&gt; 00:08:29.159
Mohammad Anwar: So this whole asynchronous business is where you don't wait for any</p>
<p>79
00:08:30.730 --&gt; 00:08:33.510
Mohammad Anwar: one, request to process. You can…</p>
<p>80
00:08:33.659 --&gt; 00:08:41.679
Mohammad Anwar: fire off a request, and then you can move on to your next task without waiting for it to finish it. So, that's how the whole</p>
<p>81
00:08:43.250 --&gt; 00:08:58.329
Mohammad Anwar: asynchronous web framework is based on. So, this is where the Pagy fast API is going to help us, where you have multiple requests coming through and not waiting for it to finish, and then you move on to your next, actions.</p>
<p>82
00:08:58.520 --&gt; 00:09:00.660
Mohammad Anwar: That's where it's gonna work out.</p>
<p>83
00:09:03.180 --&gt; 00:09:10.219
Mohammad Anwar: So… so… so… so what is Pager? It's this, like, per asynchronous gateway interface, which is… which is…</p>
<p>84
00:09:10.320 --&gt; 00:09:15.880
Mohammad Anwar: Which is like a Act like a socket, where Anybody…</p>
<p>85
00:09:16.590 --&gt; 00:09:19.819
Mohammad Anwar: Speaking, application can talk.</p>
<p>86
00:09:20.250 --&gt; 00:09:26.750
Mohammad Anwar: You can plug into this socket where you can get your applications running.</p>
<p>87
00:09:28.120 --&gt; 00:09:35.530
Mohammad Anwar: And also, you don't actually… create a page directly, and you… framework, like.</p>
<p>88
00:09:35.630 --&gt; 00:09:41.569
Mohammad Anwar: the one I created, the PG files, API can… Help you… Talk to Beijing.</p>
<p>89
00:09:46.580 --&gt; 00:09:50.679
Mohammad Anwar: So… These are the layers. So, first is your…</p>
<p>90
00:09:51.280 --&gt; 00:09:58.550
Mohammad Anwar: routes and business logic, where your application, you create your applications. And then, FastAPI, PG FastAP, where we help you</p>
<p>91
00:09:58.710 --&gt; 00:10:04.140
Mohammad Anwar: Create a routing, and all the type validations, dependency, injections.</p>
<p>92
00:10:04.520 --&gt; 00:10:09.389
Mohammad Anwar: And also, you get, automated documentation, which I'm going to show you.</p>
<p>93
00:10:09.660 --&gt; 00:10:10.610
Mohammad Anwar: Later.</p>
<p>94
00:10:12.410 --&gt; 00:10:20.510
Mohammad Anwar: And the pay… the… the… the whole, Peggy First API are views, There's a…</p>
<p>95
00:10:21.200 --&gt; 00:10:24.320
Mohammad Anwar: there's a Pagy server that comes with Pagy,</p>
<p>96
00:10:24.570 --&gt; 00:10:34.180
Mohammad Anwar: tools, which I've used it, to run my page-y fast API applications, so… That's where I'm gonna see.</p>
<p>97
00:10:37.070 --&gt; 00:10:47.180
Mohammad Anwar: So, this is what… this is how you can just create your Hello World kind of application, web application, if you want to start with the PG Fast API. So, just install it, and then…</p>
<p>98
00:10:47.490 --&gt; 00:10:49.570
Mohammad Anwar: Create an op… create an,</p>
<p>99
00:10:49.960 --&gt; 00:10:52.730
Mohammad Anwar: fast API applications, which is giving</p>
<p>100
00:10:53.490 --&gt; 00:10:59.210
Mohammad Anwar: And start giving a route, and then have a handler where it's a synchronous subroutine.</p>
<p>101
00:10:59.660 --&gt; 00:11:06.200
Mohammad Anwar: Which has a context, you get a context, and then you work… You worked with it.</p>
<p>102
00:11:06.840 --&gt; 00:11:11.320
Mohammad Anwar: context, and then display it. So this is where you get the hello world message.</p>
<p>103
00:11:11.780 --&gt; 00:11:14.680
Mohammad Anwar: And then, once you have this application.</p>
<p>104
00:11:14.910 --&gt; 00:11:21.090
Mohammad Anwar: Run it as a PG server. By default, it listens to 5,000 port.</p>
<p>105
00:11:21.310 --&gt; 00:11:26.060
Mohammad Anwar: And then, this is how you… you access your route.</p>
<p>106
00:11:26.920 --&gt; 00:11:28.150
Mohammad Anwar: Underlooker has.</p>
<p>107
00:11:33.300 --&gt; 00:11:38.510
Mohammad Anwar: Also, when you created a route, You… you can access the…</p>
<p>108
00:11:39.460 --&gt; 00:11:42.990
Mohammad Anwar: The, the parameters, routing parameters.</p>
<p>109
00:11:43.250 --&gt; 00:12:01.399
Mohammad Anwar: Just like this. And then, for example, here you're creating a route where you access a particular specific item, where you have an ID as a unique item ID, and that get access… you can access it in a context. This $C is the page E context.</p>
<p>110
00:12:01.890 --&gt; 00:12:10.159
Mohammad Anwar: excuse me, page context, and then you can figure out what the ID is as a… that you received as a routing parameter.</p>
<p>111
00:12:10.290 --&gt; 00:12:12.850
Mohammad Anwar: So, currently, you can create</p>
<p>112
00:12:13.200 --&gt; 00:12:20.750
Mohammad Anwar: Get, post, boot, patch, and delete, and all these, actions that you can create in your applications.</p>
<p>113
00:12:21.550 --&gt; 00:12:26.269
Mohammad Anwar: And they all are async by default, so it's non-blocking.</p>
<p>114
00:12:32.510 --&gt; 00:12:38.900
Mohammad Anwar: The best thing about it is you get automatic validations, which is…</p>
<p>115
00:12:39.000 --&gt; 00:12:47.269
Mohammad Anwar: built in, so you don't need to do any kind of validations manually, so just… just say, okay, so when you, when you…</p>
<p>116
00:12:47.610 --&gt; 00:12:52.970
Mohammad Anwar: For example, in this example, I'm just saying, I'm posting data.</p>
<p>117
00:12:53.080 --&gt; 00:13:00.600
Mohammad Anwar: something in these actions, and you… you can specify your key, and then your data type.</p>
<p>118
00:13:01.020 --&gt; 00:13:03.660
Mohammad Anwar: For this, we are using type dining.</p>
<p>119
00:13:03.880 --&gt; 00:13:11.780
Mohammad Anwar: For all the… The type validation is done by the type dining, so that's where you get the</p>
<p>120
00:13:12.350 --&gt; 00:13:16.979
Mohammad Anwar: All the type dining, validations you get by default.</p>
<p>121
00:13:20.840 --&gt; 00:13:25.330
Mohammad Anwar: Next is the dependency injection, which is, I think, one of the</p>
<p>122
00:13:26.680 --&gt; 00:13:34.740
Mohammad Anwar: core feature of FastAPI. This was something new for me. I was… I never heard of this before.</p>
<p>123
00:13:34.850 --&gt; 00:13:39.960
Mohammad Anwar: Which I find it very handy in case of, like, for example, when you</p>
<p>124
00:13:41.130 --&gt; 00:13:47.940
Mohammad Anwar: When you have, like, a database connection that you want to inject, and every…</p>
<p>125
00:13:49.630 --&gt; 00:13:53.420
Mohammad Anwar: And then that get injected, and then you can use it instead of…</p>
<p>126
00:13:54.890 --&gt; 00:14:02.299
Mohammad Anwar: Doing, as global, so… so you just declare it once, and then you can inject in every method that you want.</p>
<p>127
00:14:02.650 --&gt; 00:14:08.809
Mohammad Anwar: that object, to be available. So, for example, in… in an application where you…</p>
<p>128
00:14:08.830 --&gt; 00:14:23.570
Mohammad Anwar: you will interact with database every time, so you can just inject that database handle, and then inside the handler, you can access that object, and then start… you can interact with the database. So this is quite handy if you have any kind of</p>
<p>129
00:14:23.950 --&gt; 00:14:27.820
Mohammad Anwar: Code that you want to inject into any Rude.</p>
<p>130
00:14:31.640 --&gt; 00:14:37.670
Mohammad Anwar: And also, You, you get the default, support for the middleware and the cores.</p>
<p>131
00:14:38.460 --&gt; 00:14:42.290
Mohammad Anwar: So, for… if you want to add any middleware you have, you can just…</p>
<p>132
00:14:42.750 --&gt; 00:14:46.029
Mohammad Anwar: Call this add middleware method, and then pass on your</p>
<p>133
00:14:46.150 --&gt; 00:14:50.290
Mohammad Anwar: Your subroutine, and then you can work on</p>
<p>134
00:14:50.530 --&gt; 00:14:57.350
Mohammad Anwar: this add middleware features. Also, similar way, you can add course as well, if you want to have</p>
<p>135
00:14:57.830 --&gt; 00:15:05.369
Mohammad Anwar: anything, just call add course, and then you can pass whatever parameters you need to pass on. So this is how you can add the course.</p>
<p>136
00:15:06.760 --&gt; 00:15:18.190
Mohammad Anwar: I'm just going through the basic thing. If you want a fully functional application, if you go to the CPAN and go to the Peggy First API, there's a… there's a whole bunch of,</p>
<p>137
00:15:19.220 --&gt; 00:15:33.689
Mohammad Anwar: fully functional applications, where I'm going… I've gone through each of these features in detail, so you will have proper… for working core application, where you can see how it actually works in a toy application.</p>
<p>138
00:15:36.580 --&gt; 00:15:38.720
Mohammad Anwar: Next is the rate limiting.</p>
<p>139
00:15:39.030 --&gt; 00:15:43.250
Mohammad Anwar: So, the… the… This kind of thing, I…</p>
<p>140
00:15:43.400 --&gt; 00:15:46.780
Mohammad Anwar: I really liked it, because I remember when</p>
<p>141
00:15:47.530 --&gt; 00:15:54.509
Mohammad Anwar: I was building my personal website where I had to put some rate-limiting things, so…</p>
<p>142
00:15:54.620 --&gt; 00:16:01.010
Mohammad Anwar: I had to do everything by hand. So this… this… this page… page… first API.</p>
<p>143
00:16:01.150 --&gt; 00:16:06.500
Mohammad Anwar: help me not to create a boilerplate code, and then I just have everything</p>
<p>144
00:16:07.390 --&gt; 00:16:16.159
Mohammad Anwar: handy, so you don't need to do anything manually. So just add limit rate, and then you can say… you can add limit rate.</p>
<p>145
00:16:16.320 --&gt; 00:16:17.590
Mohammad Anwar: as, as an,</p>
<p>146
00:16:17.920 --&gt; 00:16:23.129
Mohammad Anwar: Per route, or you can… you can do as an overall as well… as well.</p>
<p>147
00:16:23.300 --&gt; 00:16:30.620
Mohammad Anwar: By default, the limiting is happening in memory, but you can create, other,</p>
<p>148
00:16:30.880 --&gt; 00:16:44.919
Mohammad Anwar: schema as a driver as well. So there are two separate, distributions I've created, one in CHI and one in Redis, if you want… if you want, like, an extended driver for rate limited.</p>
<p>149
00:16:48.260 --&gt; 00:16:49.730
Mohammad Anwar: Next is this.</p>
<p>150
00:16:49.830 --&gt; 00:16:54.680
Mohammad Anwar: CSRRI protection, which is also built in. By default,</p>
<p>151
00:16:54.870 --&gt; 00:16:57.219
Mohammad Anwar: It infosed, like, as a header.</p>
<p>152
00:16:57.930 --&gt; 00:16:58.640
Mohammad Anwar: And…</p>
<p>153
00:16:58.870 --&gt; 00:17:09.579
Mohammad Anwar: Now, also, it's like a double submit cookie, where it… it set the, header, and also set the token, token as well.</p>
<p>154
00:17:11.319 --&gt; 00:17:17.989
Mohammad Anwar: And this is… that's… you just call enable CSRF, and you assign the secret, whatever secret it is.</p>
<p>155
00:17:21.060 --&gt; 00:17:31.759
Mohammad Anwar: This one was… I think it's not part of the FOST API, but I added it because I thought it's quite handy if you're building a web framework and</p>
<p>156
00:17:32.170 --&gt; 00:17:34.149
Mohammad Anwar: To have this boat protection.</p>
<p>157
00:17:34.450 --&gt; 00:17:37.300
Mohammad Anwar: is… is not… Like, a complete,</p>
<p>158
00:17:37.760 --&gt; 00:17:53.640
Mohammad Anwar: implementation. It's just a basic one for now. Probably, I'm going to extend it, as I go. So, you have a difficulty level, and you can assign a boat, environmental variable as a secret, and that is used,</p>
<p>159
00:17:53.860 --&gt; 00:17:54.910
Mohammad Anwar: Every time.</p>
<p>160
00:17:55.160 --&gt; 00:17:56.889
Mohammad Anwar: Somebody tried to attack.</p>
<p>161
00:18:00.190 --&gt; 00:18:04.429
Mohammad Anwar: This is… next is the… the applications,</p>
<p>162
00:18:04.790 --&gt; 00:18:07.469
Mohammad Anwar: Lifespan, where you can just have a…</p>
<p>163
00:18:07.740 --&gt; 00:18:11.930
Mohammad Anwar: on startup and on shutdown. This is quite handy if you…</p>
<p>164
00:18:12.140 --&gt; 00:18:28.930
Mohammad Anwar: If you have, like, a… if you have, database interaction, so mostly, like, on startup, you can just set up your database instance, and on shutdown, you can probably, clean up your database handle once everything is… is done, so you have a nice…</p>
<p>165
00:18:29.470 --&gt; 00:18:36.829
Mohammad Anwar: like, entry point on startup and shutdown. So you can use this, on startup and on shutdown method.</p>
<p>166
00:18:36.970 --&gt; 00:18:39.120
Mohammad Anwar: To do this kind of operation.</p>
<p>167
00:18:42.150 --&gt; 00:18:47.720
Mohammad Anwar: Next is the WebSocket. I have been playing with the WebSocket.</p>
<p>168
00:18:48.110 --&gt; 00:18:58.519
Mohammad Anwar: in the recent past. So, when I was doing this, I thought, why not implement a WebSocket as well on top of this PG FAST API? So, this is where</p>
<p>169
00:18:58.820 --&gt; 00:19:06.020
Mohammad Anwar: Basically, I'm… I'm using, the, there's a Pagy WebSocket, distribution already.</p>
<p>170
00:19:06.360 --&gt; 00:19:16.020
Mohammad Anwar: available from Pagey tools, from the PG specification, so nothing is done here. Everything is delegated to that PG web socket.</p>
<p>171
00:19:16.200 --&gt; 00:19:19.719
Mohammad Anwar: And that's where everything is happening, so you just…</p>
<p>172
00:19:19.830 --&gt; 00:19:25.929
Mohammad Anwar: create a web… call a WebSocket method, and just pass in the handler, and that will do.</p>
<p>173
00:19:26.260 --&gt; 00:19:28.779
Mohammad Anwar: the WebSocket functionality for you.</p>
<p>174
00:19:31.990 --&gt; 00:19:34.860
Mohammad Anwar: Next is SSE, again.</p>
<p>175
00:19:35.310 --&gt; 00:19:40.150
Mohammad Anwar: This is, again, delegated to the PG SSI, which… from Pagey Tools.</p>
<p>176
00:19:40.690 --&gt; 00:19:41.849
Mohammad Anwar: Not from the…</p>
<p>177
00:19:42.150 --&gt; 00:19:48.910
Mohammad Anwar: PG Fast API, but this is quite handy, and you get, by default, if you… if you have</p>
<p>178
00:19:49.130 --&gt; 00:19:59.359
Mohammad Anwar: if you want a SSE functionality in AGFAST API, you just create a method, and then root, and then you provide a handler where you can</p>
<p>179
00:19:59.460 --&gt; 00:20:03.559
Mohammad Anwar: do all kind of SSE-related operations inside this handler.</p>
<p>180
00:20:03.740 --&gt; 00:20:06.499
Mohammad Anwar: As an asynchronous, mode.</p>
<p>181
00:20:09.910 --&gt; 00:20:27.520
Mohammad Anwar: this is something, I… was not 100% sure, but then, after talking to John, the creator of Pengie, and I thought, okay, basically, I did… I don't want to keep, like, a…</p>
<p>182
00:20:27.660 --&gt; 00:20:28.610
Mohammad Anwar: Later, yes.</p>
<p>183
00:20:29.480 --&gt; 00:20:33.680
Mohammad Anwar: Basic… I didn't want to have, like, a proper…</p>
<p>184
00:20:34.280 --&gt; 00:20:43.400
Mohammad Anwar: whether to use a feature I.O. or iOSync. So, eventually, we decided that it's better to keep a feature I.O.</p>
<p>185
00:20:43.720 --&gt; 00:20:45.369
Mohammad Anwar: As, as my,</p>
<p>186
00:20:45.670 --&gt; 00:20:56.860
Mohammad Anwar: all the IO sync thingy. So it's… so for all the event loops, everything is dependent on feature I.O. as a baseline.</p>
<p>187
00:20:59.330 --&gt; 00:21:07.900
Mohammad Anwar: are also… with, first, PG Fast API, you get the… by… by default, you get the…</p>
<p>188
00:21:09.100 --&gt; 00:21:13.159
Mohammad Anwar: the documentation, so I get documentation for free.</p>
<p>189
00:21:13.470 --&gt; 00:21:19.820
Mohammad Anwar: And… just get a slash docs and slash open API JSON you get by default.</p>
<p>190
00:21:20.370 --&gt; 00:21:26.469
Mohammad Anwar: So it's quite handy if you have… if you… you don't need to build the Sawyer interface by hand, you just get</p>
<p>191
00:21:26.850 --&gt; 00:21:27.969
Mohammad Anwar: by default.</p>
<p>192
00:21:31.800 --&gt; 00:21:36.330
Mohammad Anwar: So… Again, as a recap, I'm going to say…</p>
<p>193
00:21:37.650 --&gt; 00:21:44.389
Mohammad Anwar: Why picking FastAPI? Because it's async and it's non-blocking, which is the main features.</p>
<p>194
00:21:44.900 --&gt; 00:21:49.740
Mohammad Anwar: You get a database injection, dependency injection, as a second feature.</p>
<p>195
00:21:50.110 --&gt; 00:21:53.850
Mohammad Anwar: Third is this… is… is it type safe. You can… you can…</p>
<p>196
00:21:54.050 --&gt; 00:21:56.699
Mohammad Anwar: You, you get a default,</p>
<p>197
00:21:56.870 --&gt; 00:21:59.940
Mohammad Anwar: type checks using the TypeTiny module.</p>
<p>198
00:22:00.060 --&gt; 00:22:02.830
Mohammad Anwar: And you get automated documentation.</p>
<p>199
00:22:06.280 --&gt; 00:22:09.390
Mohammad Anwar: So one thing that was missing was this.</p>
<p>200
00:22:09.890 --&gt; 00:22:11.250
Mohammad Anwar: security thing.</p>
<p>201
00:22:11.910 --&gt; 00:22:21.050
Mohammad Anwar: So, so far, we never… we haven't touched the… The security pathway, how to…</p>
<p>202
00:22:21.200 --&gt; 00:22:26.619
Mohammad Anwar: to process the session and everything. So, I really wanted to build in</p>
<p>203
00:22:27.420 --&gt; 00:22:35.899
Mohammad Anwar: the authorizations. For this, I created a separate distribution called PG Fast API Security, which is</p>
<p>204
00:22:37.370 --&gt; 00:22:48.440
Mohammad Anwar: separate distribution outside of PG FastAPI that handles all four common schemes that is in the Python Fast API.</p>
<p>205
00:22:49.290 --&gt; 00:22:57.150
Mohammad Anwar: these are the four… the four schemes that for HTTP bearer, HTTP basic API key, and odd.</p>
<p>206
00:22:57.900 --&gt; 00:22:59.980
Mohammad Anwar: And… These are…</p>
<p>207
00:23:00.590 --&gt; 00:23:07.590
Mohammad Anwar: like, implemented as a separate distribution page for the API security. You can… you get all those</p>
<p>208
00:23:08.000 --&gt; 00:23:11.199
Mohammad Anwar: Four schemes, depending on how you want to use it.</p>
<p>209
00:23:11.660 --&gt; 00:23:18.060
Mohammad Anwar: One thing is there is the… and all… this PG8 Fast API Security, we… we actually</p>
<p>210
00:23:18.540 --&gt; 00:23:28.109
Mohammad Anwar: don't do any verification. It's just… we do this, just extract. We just, find out what is in there, and we just…</p>
<p>211
00:23:30.120 --&gt; 00:23:36.609
Mohammad Anwar: we just fetch the security details and doesn't do any checks. Checking is done by</p>
<p>212
00:23:36.950 --&gt; 00:23:40.030
Mohammad Anwar: The applications on top of it.</p>
<p>213
00:23:41.710 --&gt; 00:23:43.230
Mohammad Anwar: For example, here.</p>
<p>214
00:23:43.370 --&gt; 00:23:43.840
Mohammad Anwar: And then…</p>
<p>215
00:23:43.840 --&gt; 00:23:49.379
Gabor Szabo: Sorry. No, but actually, go on, I'll ask you the questions after.</p>
<p>216
00:23:51.030 --&gt; 00:23:54.390
Mohammad Anwar: Okay, so for example, here in this,</p>
<p>217
00:23:54.750 --&gt; 00:23:58.140
Mohammad Anwar: We're creating a STT bearer scheme.</p>
<p>218
00:23:58.600 --&gt; 00:24:05.059
Mohammad Anwar: as there, and then we inject that, as the token gets injected as dependencies.</p>
<p>219
00:24:05.400 --&gt; 00:24:06.090
Mohammad Anwar: And…</p>
<p>220
00:24:06.410 --&gt; 00:24:20.119
Mohammad Anwar: Here, if you see, we're calling the verify JWT, which is Java token verification, which is outside of this… this framework. So you… this scheme doesn't</p>
<p>221
00:24:20.420 --&gt; 00:24:39.389
Mohammad Anwar: give you this default, you have to create your own verification logic, and… and once you're done, and then you just… if… if it… if there is any issue, you just, you don't die, you actually set the status, and then return the details. That's how you… you handle the…</p>
<p>222
00:24:39.520 --&gt; 00:24:45.460
Mohammad Anwar: any… Error, or any… any issue with the verifications. If anything.</p>
<p>223
00:24:46.330 --&gt; 00:24:48.429
Mohammad Anwar: Anything, needs to be handled.</p>
<p>224
00:24:52.050 --&gt; 00:24:55.499
Gabor Szabo: Okay, maybe now is the time to ask the questions, right?</p>
<p>225
00:24:55.670 --&gt; 00:24:58.319
Gabor Szabo: Because you're in between two topics.</p>
<p>226
00:24:58.430 --&gt; 00:25:06.179
Gabor Szabo: The first question was, is PUGI, I don't know, PAGI? Fast PAGI?</p>
<p>227
00:25:06.350 --&gt; 00:25:09.149
Gabor Szabo: Fast API reverse proxy Aware.</p>
<p>228
00:25:11.220 --&gt; 00:25:12.800
Mohammad Anwar: Right now, no.</p>
<p>229
00:25:14.680 --&gt; 00:25:23.250
Gabor Szabo: So does it mean that you have to put it in front of the… so that that's the front first thing on the internet? So you can't put a reverse proxy in front of it?</p>
<p>230
00:25:24.480 --&gt; 00:25:25.110
Gabor Szabo: Okay.</p>
<p>231
00:25:25.110 --&gt; 00:25:26.589
Mohammad Anwar: At this point, no.</p>
<p>232
00:25:28.700 --&gt; 00:25:37.100
Gabor Szabo: Okay, and then it continues, like, PHEI talking to… talking HTTP to a HA proxy.</p>
<p>233
00:25:37.330 --&gt; 00:25:41.309
Gabor Szabo: And then HAProxy talks to clients over HTTPS.</p>
<p>234
00:25:42.130 --&gt; 00:25:42.720
Mohammad Anwar: Yeah.</p>
<p>235
00:25:43.270 --&gt; 00:25:44.660
Gabor Szabo: If that's possible?</p>
<p>236
00:25:45.930 --&gt; 00:25:50.140
Mohammad Anwar: I've not tried it, maybe I'll give it a try, see if it's possible.</p>
<p>237
00:25:50.520 --&gt; 00:25:51.789
Mohammad Anwar: I think it should be.</p>
<p>238
00:25:53.090 --&gt; 00:25:58.979
Gabor Szabo: Okay. The other question is, how do I customize the automated docs?</p>
<p>239
00:25:59.380 --&gt; 00:26:04.370
Gabor Szabo: E.g, I want to add a description or request example.</p>
<p>240
00:26:05.920 --&gt; 00:26:13.899
Mohammad Anwar: You, you can. I'm going to show you later, where I have created another application where</p>
<p>241
00:26:14.430 --&gt; 00:26:26.560
Mohammad Anwar: I'm going to show you how I've described all the description of the doc where you can see everything, how you can manage, set up everything in an application. I'm going to show you.</p>
<p>242
00:26:26.750 --&gt; 00:26:27.500
Gabor Szabo: Okay.</p>
<p>243
00:26:28.800 --&gt; 00:26:35.569
Mohammad Anwar: So… later, after this, security schemes, I even…</p>
<p>244
00:26:36.080 --&gt; 00:26:38.409
Mohammad Anwar: I added these to type bot.</p>
<p>245
00:26:38.960 --&gt; 00:26:43.639
Mohammad Anwar: and then response model, and all those features. So…</p>
<p>246
00:26:44.390 --&gt; 00:26:51.309
Mohammad Anwar: with this type path, this… either this pagey fast API type path, where you can check the,</p>
<p>247
00:26:51.780 --&gt; 00:27:00.850
Mohammad Anwar: the data type, as well, of the, of the, the root, Root, pathroot.</p>
<p>248
00:27:00.960 --&gt; 00:27:06.700
Mohammad Anwar: So, for example, here I'm checking whether the item ID is integer,</p>
<p>249
00:27:07.410 --&gt; 00:27:14.099
Mohammad Anwar: So this kind of validation can be done as a part of dependency. You can check all those… the key.</p>
<p>250
00:27:14.370 --&gt; 00:27:27.059
Mohammad Anwar: And with the response model, with this, another distribution, which is PG Fast API response model, with this method, with response model, we can add… we can… we can add and make it as a handler, and then</p>
<p>251
00:27:27.390 --&gt; 00:27:33.179
Mohammad Anwar: that further checks can be done, like, for example, ID should be in an integer, name should be in a string.</p>
<p>252
00:27:33.810 --&gt; 00:27:41.220
Mohammad Anwar: So, that can be done as well, with these two handy path and response model distribution package.</p>
<p>253
00:27:45.140 --&gt; 00:27:53.470
Mohammad Anwar: So… The full picture is, basically, you create your application where you define your rules and business logic.</p>
<p>254
00:27:54.010 --&gt; 00:27:58.970
Mohammad Anwar: And then Fast API… page… PG-fast API security.</p>
<p>255
00:27:59.140 --&gt; 00:28:03.209
Mohammad Anwar: Help you with, with the defense and,</p>
<p>256
00:28:03.350 --&gt; 00:28:09.420
Mohammad Anwar: And you can check the… extract the auth key, auth token, everything.</p>
<p>257
00:28:09.530 --&gt; 00:28:18.030
Mohammad Anwar: And then, first API, FastAPI, PG Fast API can help you doing the routing and all validations and injections.</p>
<p>258
00:28:18.370 --&gt; 00:28:20.959
Mohammad Anwar: And finally, with a PG server.</p>
<p>259
00:28:21.410 --&gt; 00:28:26.240
Mohammad Anwar: Your application can start… you can restart running your application there.</p>
<p>260
00:28:29.030 --&gt; 00:28:30.840
Mohammad Anwar: Okay… Food.</p>
<p>261
00:28:31.730 --&gt; 00:28:34.539
Mohammad Anwar: These are my common questions, okay.</p>
<p>262
00:28:35.700 --&gt; 00:28:39.990
Mohammad Anwar: how does this compare? I mean, it's exactly the same thing,</p>
<p>263
00:28:40.260 --&gt; 00:28:45.120
Mohammad Anwar: what I have found out in Python FastAPI. I might have missed something.</p>
<p>264
00:28:45.820 --&gt; 00:28:51.910
Mohammad Anwar: So if you find anything missing, probably you can tell me, and then I can… Fill those gaps.</p>
<p>265
00:28:53.260 --&gt; 00:29:00.130
Mohammad Anwar: And… as I say, maybe you don't need to learn iOS or feature async deeply, so just</p>
<p>266
00:29:01.960 --&gt; 00:29:08.749
Mohammad Anwar: Peggy Sabo owns all the event loops, so everything is done, so you don't need to be worrying anything.</p>
<p>267
00:29:09.870 --&gt; 00:29:12.310
Mohammad Anwar: And… Authentication built in.</p>
<p>268
00:29:12.700 --&gt; 00:29:16.200
Mohammad Anwar: Not by design, but you can create a schema.</p>
<p>269
00:29:16.660 --&gt; 00:29:20.120
Mohammad Anwar: And then use a middleware, and depends.</p>
<p>270
00:29:20.610 --&gt; 00:29:21.950
Mohammad Anwar: For security ads.</p>
<p>271
00:29:26.240 --&gt; 00:29:36.500
Mohammad Anwar: for Perl version, I… the whole, the whole framework are used The latest world-class field… world-class…</p>
<p>272
00:29:37.120 --&gt; 00:29:39.420
Mohammad Anwar: New per class, so, method.</p>
<p>273
00:29:40.280 --&gt; 00:29:49.000
Mohammad Anwar: Feature, experimental feature, or… And for that, I see… the minimum is 538 is what you need, and then…</p>
<p>274
00:29:49.220 --&gt; 00:29:54.289
Mohammad Anwar: That's the minimum is… you can… you have to have to run this PGA.</p>
<p>275
00:29:54.520 --&gt; 00:29:55.710
Mohammad Anwar: Bonsai APA.</p>
<p>276
00:29:57.680 --&gt; 00:30:03.380
Mohammad Anwar: And also for… For rate limit, by default,</p>
<p>277
00:30:03.910 --&gt; 00:30:13.609
Mohammad Anwar: By default, you get an in-memory rate limit, but you can have a ready source CHI as well, if you want to have that backend for rate limit.</p>
<p>278
00:30:15.830 --&gt; 00:30:21.800
Mohammad Anwar: You can, of course, you can ask any bug… you can report your bug to the GitHub repository.</p>
<p>279
00:30:22.020 --&gt; 00:30:29.730
Mohammad Anwar: Which is a pagey-fast API issues, where you can… you can report any issues or any requests you have, yeah.</p>
<p>280
00:30:31.710 --&gt; 00:30:32.679
Mohammad Anwar: the… the name?</p>
<p>281
00:30:32.680 --&gt; 00:30:34.060
Gabor Szabo: Another question.</p>
<p>282
00:30:34.250 --&gt; 00:30:46.500
Gabor Szabo: Sorry, another question. What about nested data validation? A flow in using TypeTiny for schema validation is that there isn't a way to model presence.</p>
<p>283
00:30:47.810 --&gt; 00:30:54.319
Gabor Szabo: As far… if I… as far as I know. I could be wrong, though. That's the com… that's the question.</p>
<p>284
00:30:55.780 --&gt; 00:30:58.190
Mohammad Anwar: So you're saying… sorry, I didn't get the question.</p>
<p>285
00:30:59.050 --&gt; 00:31:03.230
Gabor Szabo: Yeah, so the question is, is there nested data validation?</p>
<p>286
00:31:04.400 --&gt; 00:31:06.910
Mohammad Anwar: No, no, not at the moment, not currently.</p>
<p>287
00:31:07.320 --&gt; 00:31:08.100
Gabor Szabo: Okay.</p>
<p>288
00:31:08.360 --&gt; 00:31:11.490
Mohammad Anwar: So it's just… just key value, key value.</p>
<p>289
00:31:13.040 --&gt; 00:31:18.620
Mohammad Anwar: Not as an estate one right now, but yeah, maybe in future we can support that.</p>
<p>290
00:31:19.950 --&gt; 00:31:26.509
Mohammad Anwar: So, I think the latest version is 1.73 is the latest on CPAN.</p>
<p>291
00:31:27.360 --&gt; 00:31:32.740
Mohammad Anwar: And we… Yes.</p>
<p>292
00:31:34.090 --&gt; 00:31:37.480
Mohammad Anwar: Does the type path replace query? No, it's parameter.</p>
<p>293
00:31:38.270 --&gt; 00:31:41.110
Mohammad Anwar: So you're still using type R, type training.</p>
<p>294
00:31:41.930 --&gt; 00:31:52.819
Mohammad Anwar: Exception Handler? Yes, we have Exception Handler, this package, for… For this… That's it.</p>
<p>295
00:31:55.140 --&gt; 00:31:56.370
Mohammad Anwar: I'm sure.</p>
<p>296
00:31:58.190 --&gt; 00:31:59.440
Mohammad Anwar: to desire them.</p>
<p>297
00:32:01.260 --&gt; 00:32:08.500
Mohammad Anwar: my GitHub repository for Fast API… PG Fast API, and PG Fast API Security.</p>
<p>298
00:32:09.860 --&gt; 00:32:13.110
Mohammad Anwar: And before I cut that, let me…</p>
<p>299
00:32:16.550 --&gt; 00:32:18.810
Mohammad Anwar: Can… can I… can you see my screen?</p>
<p>300
00:32:22.280 --&gt; 00:32:23.720
Mohammad Anwar: Can you see my screen?</p>
<p>301
00:32:23.720 --&gt; 00:32:25.420
Gabor Szabo: Yes, we can see him at the CPU.</p>
<p>302
00:32:25.420 --&gt; 00:32:30.100
Mohammad Anwar: So, this is my, C-pen, metal C-pen, where…</p>
<p>303
00:32:30.240 --&gt; 00:32:32.540
Mohammad Anwar: first API. I'm going to show you</p>
<p>304
00:32:33.440 --&gt; 00:32:36.819
Mohammad Anwar: In my presentation, I've only touched</p>
<p>305
00:32:38.010 --&gt; 00:32:41.909
Mohammad Anwar: this, surface. So, if you want to go in details.</p>
<p>306
00:32:41.910 --&gt; 00:32:53.690
Gabor Szabo: Wait a second, there is a very… another question here. Is the event loop an internal detail? Can the program hook to it to wait for other events, like file system?</p>
<p>307
00:32:59.830 --&gt; 00:33:02.159
Mohammad Anwar: Sorry, I didn't… I didn't understand whatsoever's question.</p>
<p>308
00:33:02.160 --&gt; 00:33:16.559
Gabor Szabo: Yeah, I'm not sure that I understand totally the question, but the question is, is the event loop internal… an internal detail? And then the continuation is, can the program hook to it to wait for other events?</p>
<p>309
00:33:16.840 --&gt; 00:33:17.290
Mohammad Anwar: None.</p>
<p>310
00:33:17.290 --&gt; 00:33:17.730
Gabor Szabo: by, you know.</p>
<p>311
00:33:17.960 --&gt; 00:33:20.840
Mohammad Anwar: N-No, no, no, not at the moment.</p>
<p>312
00:33:21.120 --&gt; 00:33:31.379
Gabor Szabo: No, I mean, okay, so that's strange to me. So if you have a… so it's only async on the website? If you go to the database, it's not a sync?</p>
<p>313
00:33:32.030 --&gt; 00:33:35.059
Mohammad Anwar: It is… no, from the database side, yes, it is a sync, yeah.</p>
<p>314
00:33:35.310 --&gt; 00:33:42.309
Gabor Szabo: And if you want… so also, if you have an async database access… sorry, file system access, that's also async, right?</p>
<p>315
00:33:43.420 --&gt; 00:33:45.010
Mohammad Anwar: Yes, that's true, yeah.</p>
<p>316
00:33:45.010 --&gt; 00:33:49.509
Gabor Szabo: Yeah, so, yeah, but you don't hook into the… into the event loop.</p>
<p>317
00:33:50.020 --&gt; 00:33:50.750
Mohammad Anwar: No, you don.</p>
<p>318
00:33:50.750 --&gt; 00:33:57.969
Gabor Szabo: you can have the… you can have async methods, so I'm not sure I understand the question totally.</p>
<p>319
00:33:58.760 --&gt; 00:34:03.329
Gabor Szabo: But you can… can have… use other async methods, right?</p>
<p>320
00:34:03.840 --&gt; 00:34:09.160
Mohammad Anwar: Yes. So, for example, in this application, you can find it on the…</p>
<p>321
00:34:09.280 --&gt; 00:34:14.239
Mohammad Anwar: in the distribution, where I am… I'm showing,</p>
<p>322
00:34:15.370 --&gt; 00:34:21.460
Mohammad Anwar: So, if… if you can see, I… have a DBIC async,</p>
<p>323
00:34:22.570 --&gt; 00:34:30.899
Mohammad Anwar: handler, class, where I'm having a database connection to a SQLite, and running as an async, Divic.</p>
<p>324
00:34:31.480 --&gt; 00:34:42.260
Mohammad Anwar: And then… I bought… one route which I'm posting data, and second is on Fitching a user ID.</p>
<p>325
00:34:44.310 --&gt; 00:34:48.580
Mohammad Anwar: If I can… maybe I can run this application.</p>
<p>326
00:34:48.909 --&gt; 00:34:50.059
Mohammad Anwar: Maybe not.</p>
<p>327
00:34:50.300 --&gt; 00:34:55.679
Mohammad Anwar: So, so, for example, so these are the examples you can find, And the…</p>
<p>328
00:34:56.080 --&gt; 00:35:00.030
Mohammad Anwar: in the MetaCPN, distribution, for all this.</p>
<p>329
00:35:00.980 --&gt; 00:35:14.800
Mohammad Anwar: CSRF, if you want to look into the details how you can implement CSRF using PG Fast API, you can look into these examples, or if you're looking at the DBK Sync integration, or you can look into the</p>
<p>330
00:35:14.860 --&gt; 00:35:21.229
Mohammad Anwar: the docs, how the docs get created for… that's what the Giver was asking. So, for example, if I…</p>
<p>331
00:35:21.910 --&gt; 00:35:29.170
Mohammad Anwar: Open up here, so… this… this is quite, this is interesting, and I got quite a…</p>
<p>332
00:35:29.470 --&gt; 00:35:45.790
Mohammad Anwar: nice, working example. So you can go into the details in these examples where you can find, exactly how you can implement. There's another example called where you have a rate limit, how you implement the rate limit using the pages.</p>
<p>333
00:35:46.340 --&gt; 00:35:47.540
Mohammad Anwar: first API.</p>
<p>334
00:35:47.670 --&gt; 00:35:53.200
Mohammad Anwar: Similarly, you have an example, complete application where you can implement the SSE.</p>
<p>335
00:35:54.120 --&gt; 00:36:14.030
Mohammad Anwar: and all the webhook examples, WebSocket examples. So, quite a lot of working examples here, where you can explore how this fast API, PG Fast API, can be used to build, like, fully functional applications, where you have an asynchronous, operations.</p>
<p>336
00:36:14.350 --&gt; 00:36:32.030
Mohammad Anwar: and integrate it with the database as well. If the database… database can be asynchronous as well, like what the Gabor was saying. So, you can… you can use… you can use, like, a regular database, or you can use an asynchronous, like, DB class async as well, with your web applications.</p>
<p>337
00:36:32.650 --&gt; 00:36:34.430
Mohammad Anwar: That's why you can use it.</p>
<p>338
00:36:34.710 --&gt; 00:36:38.579
Mohammad Anwar: And if… if you really want to… I've got this,</p>
<p>339
00:36:39.940 --&gt; 00:36:43.149
Mohammad Anwar: my blog web, page, where I…</p>
<p>340
00:36:44.070 --&gt; 00:36:57.510
Mohammad Anwar: gone through individual, features of FastAPI. For example, if you're interested to know how Webhook works with Pagey FastAPI, you can go through individual blog posts where I have webhook, MessageQ,</p>
<p>341
00:36:57.570 --&gt; 00:37:08.879
Mohammad Anwar: API Gateway you can build with FastAPI, and then WebSocket, and also how to integrate your DBIX class async, with the Fast API, PG Fast API. So all…</p>
<p>342
00:37:09.290 --&gt; 00:37:15.169
Mohammad Anwar: This… this blog post, can take you through the details, how you can</p>
<p>343
00:37:15.690 --&gt; 00:37:22.719
Mohammad Anwar: and go through buildup from the scratch using the PG Fast API, these features.</p>
<p>344
00:37:25.120 --&gt; 00:37:27.950
Mohammad Anwar: So, these are… these are the first API.</p>
<p>345
00:37:28.400 --&gt; 00:37:32.530
Mohammad Anwar: And… you have a security where I have…</p>
<p>346
00:37:32.670 --&gt; 00:37:36.590
Mohammad Anwar: these are the schemes currently. We've got API key.</p>
<p>347
00:37:36.820 --&gt; 00:37:40.019
Mohammad Anwar: basics, barrier, and OAuth schemes.</p>
<p>348
00:37:40.920 --&gt; 00:37:48.979
Mohammad Anwar: And again, you have working examples here where you can go through, because S… The examples are…</p>
<p>349
00:37:49.300 --&gt; 00:38:01.890
Mohammad Anwar: It's a complete application, so you can go through how everything can be plugged together to give you a complete application using all these different schemes, security schemes you have.</p>
<p>350
00:38:03.720 --&gt; 00:38:04.680
Mohammad Anwar: So, yeah.</p>
<p>351
00:38:04.880 --&gt; 00:38:07.560
Mohammad Anwar: So that's… that's what I have so far.</p>
<p>352
00:38:07.850 --&gt; 00:38:08.770
Mohammad Anwar: Thank you.</p>
<p>353
00:38:20.690 --&gt; 00:38:23.400
Mohammad Anwar: So that's it for me. Any questions?</p>
<p>354
00:38:24.350 --&gt; 00:38:26.050
Gabor Szabo: Then please stop sharing.</p>
<p>355
00:38:29.140 --&gt; 00:38:30.010
Gabor Szabo: Okay.</p>
<p>356
00:38:30.430 --&gt; 00:38:43.479
Gabor Szabo: If there are questions, please ask in the chat. There are some comments, so I can read them out in the meantime. So there was a comment that, yes, you can hook into the IO async loop.</p>
<p>357
00:38:43.560 --&gt; 00:38:52.090
Gabor Szabo: But it doesn't happen automatically. You would have to use a file system module designed to work with iOSync Loop.</p>
<p>358
00:38:52.700 --&gt; 00:39:09.909
Gabor Szabo: And then, this is why Mojo PG, or Mojo MySQL, and so on, were created, because most things in Perl aren't asynchronous. You have to recreate everything to become a sync, and because there isn't a single standard event loop.</p>
<p>359
00:39:09.910 --&gt; 00:39:18.109
Gabor Szabo: You have to design them to work with the specific loops, for example, the IO async loop, or the module I.O. loop, and so on.</p>
<p>360
00:39:18.610 --&gt; 00:39:33.189
Gabor Szabo: And then another comment here related to this, you need a loop to be a sync. When you make DB file system calls, you can create a promise, but that promise lives in the server's event loop.</p>
<p>361
00:39:33.550 --&gt; 00:39:38.870
Gabor Szabo: Or should be, or should to be efficient, I think.</p>
<p>362
00:39:39.130 --&gt; 00:39:42.630
Gabor Szabo: Most async modules have a loop barometer.</p>
<p>363
00:39:44.120 --&gt; 00:39:45.389
Gabor Szabo: That's the comment.</p>
<p>364
00:39:47.030 --&gt; 00:39:50.960
Mohammad Anwar: I think this… I think this is… Very well explained by…</p>
<p>365
00:39:52.160 --&gt; 00:39:55.589
Mohammad Anwar: Yeah, Newkirk… I don't know how you call it, Newk.</p>
<p>366
00:39:55.590 --&gt; 00:39:57.199
Gabor Szabo: Yeah, yeah, yeah.</p>
<p>367
00:39:57.200 --&gt; 00:39:57.840
Mohammad Anwar: Yeah.</p>
<p>368
00:39:58.120 --&gt; 00:40:07.219
Gabor Szabo: Yeah, we can discuss it afterwards. If there are any more comments that you would like to ask, anything else you would like to say, Mohammad, I think…</p>
<p>369
00:40:08.030 --&gt; 00:40:11.950
Gabor Szabo: From my side, I really enjoyed it. I learned how to</p>
<p>370
00:40:12.330 --&gt; 00:40:27.980
Gabor Szabo: I should now go and play with it. I don't know if I will have the time. I would really like to see a bunch of applications, and some people demoing how to, how to use that. Okay, someone says that ask two questions.</p>
<p>371
00:40:28.340 --&gt; 00:40:30.050
Gabor Szabo: But,</p>
<p>372
00:40:30.940 --&gt; 00:40:31.390
Mohammad Anwar: Yeah, dude.</p>
<p>373
00:40:31.390 --&gt; 00:40:33.159
Gabor Szabo: After that, yeah, yeah, I owe them.</p>
<p>374
00:40:33.160 --&gt; 00:40:37.780
Mohammad Anwar: If you really want to play with it, I would suggest</p>
<p>375
00:40:38.140 --&gt; 00:40:57.390
Mohammad Anwar: to look into the examples that are… that's shipped with the distributions. They are quite… they're quite a good starting point if you want to explore how to do certain features in using Peggy FastAPI. They are, like, complete applications. Like, it's… it's a toy application, but it's complete.</p>
<p>376
00:40:57.390 --&gt; 00:41:08.980
Mohammad Anwar: So you get to know exactly how to… to bring in all the features that are supported by the Pagey Fast API, and how you can plug in each other, and then you get a final, like, feature function.</p>
<p>377
00:41:09.020 --&gt; 00:41:09.610
Mohammad Anwar: So, yeah.</p>
<p>378
00:41:09.610 --&gt; 00:41:16.390
Gabor Szabo: I sort of meant, like, real-world application deployed, making tons of money.</p>
<p>379
00:41:16.650 --&gt; 00:41:22.390
Gabor Szabo: That's what I meant. Not just examples, but that's a good start.</p>
<p>380
00:41:24.420 --&gt; 00:41:29.920
Gabor Szabo: I'm just calling for all the other people who are here, so…</p>
<p>381
00:41:30.450 --&gt; 00:41:39.230
Gabor Szabo: Okay, maybe I missed those questions. Next to authentication, what about authorization and audit AA? That's another question.</p>
<p>382
00:41:39.790 --&gt; 00:41:45.389
Gabor Szabo: Next to authentication, what about authorization and audit?</p>
<p>383
00:41:46.920 --&gt; 00:41:53.539
Mohammad Anwar: Okay, so… Is, right now, we don't do that.</p>
<p>384
00:41:53.750 --&gt; 00:41:57.420
Mohammad Anwar: We're also only doing authentication, not authorization at the moment.</p>
<p>385
00:41:59.190 --&gt; 00:42:07.140
Gabor Szabo: Okay, and does PAGI or PAGI FastAPI allow under, like in modularysis? There's an under…</p>
<p>386
00:42:07.420 --&gt; 00:42:09.849
Gabor Szabo: I don't know, it's method or whatever, it's a feature.</p>
<p>387
00:42:11.180 --&gt; 00:42:17.369
Mohammad Anwar: I've not… I've not tried it. I don't know whether it's gonna… how it's gonna behave. I have to try, see if…</p>
<p>388
00:42:20.540 --&gt; 00:42:25.860
Gabor Szabo: Okay, then someone is, has a 538, and so…</p>
<p>389
00:42:25.860 --&gt; 00:42:26.470
Mohammad Anwar: Yeah.</p>
<p>390
00:42:26.470 --&gt; 00:42:27.400
Gabor Szabo: They can't use it.</p>
<p>391
00:42:27.400 --&gt; 00:42:35.470
Mohammad Anwar: I don't know, I don't know why I picked 538, it's just because I want to try the new class syntax.</p>
<p>392
00:42:35.940 --&gt; 00:42:36.690
Mohammad Anwar: I mean…</p>
<p>393
00:42:36.690 --&gt; 00:42:56.630
Gabor Szabo: It shouldn't be a big issue at the end. You can use Docker if you just want to make a totally isolated version of Perl that you can get rid of easily. I have this Docker image that I use for all the things that I play with.</p>
<p>394
00:42:57.090 --&gt; 00:43:03.399
Gabor Szabo: when I play with various things with Sperm, so they will be separated from my regular.</p>
<p>395
00:43:03.400 --&gt; 00:43:14.249
Mohammad Anwar: If it becomes a blocker, I'll probably drop this restriction and go back to, like, a regular, like, a piled object, rather than using this new</p>
<p>396
00:43:14.620 --&gt; 00:43:20.040
Mohammad Anwar: shiny Perl class syntax, if that is, like, a big issue.</p>
<p>397
00:43:20.300 --&gt; 00:43:29.749
Mohammad Anwar: It's just for fun, I said, okay, why not? Because I've never used this in my… any of my distributions. So I thought, let's… let's try. So I… I started using this class.</p>
<p>398
00:43:31.590 --&gt; 00:43:32.510
Gabor Szabo: Okay.</p>
<p>399
00:43:32.540 --&gt; 00:43:55.939
Gabor Szabo: Well, thank you very much. I think we can finish the video recording at least now. Thank you very much for this presentation. Those people who are here in the live session, you can stay around after the session is over, after I stop the recording, then I will turn on the videos again, so you can turn on your video and your mic.</p>
<p>400
00:43:55.940 --&gt; 00:44:06.669
Gabor Szabo: And then we can go and have a conversation. And those people who are watching the video, please like it and follow the channel, and below the video, you will find links to future events.</p>
<p>401
00:44:06.670 --&gt; 00:44:16.310
Gabor Szabo: And also for details about this event that links and whatever, for example, to the profile of Mohammad, in case you would like to get in touch with him.</p>
<p>402
00:44:17.790 --&gt; 00:44:19.019
Gabor Szabo: Thank you very much.</p>
<p>403
00:44:20.590 --&gt; 00:44:31.880
Mohammad Anwar: Thank you, everybody, thank you. As I said, I was nervous when I saw so many people register, and you could tell from my presentation, I did.</p>
<p>404
00:44:32.000 --&gt; 00:44:32.920
Mohammad Anwar: Pause.</p>
<p>405
00:44:33.140 --&gt; 00:44:35.880
Mohammad Anwar: And I was… you can tell I was quite…</p>
<p>406
00:44:36.100 --&gt; 00:44:42.510
Mohammad Anwar: having anxiety, I mean, I didn't know what I'm talking about, but… Very fair, brother.</p>
<p>407
00:44:42.580 --&gt; 00:44:45.670
Gabor Szabo: It worked well. Thank you very much. Goodbye for everyone.</p>
]]></content>
    <author>
      <name></name>
    </author>
  </entry>

  <entry>
    <title>Punk: Perl MVC, compiled at boot</title>
    <summary type="html"><![CDATA[]]></summary>
    <updated>2026-08-12T11:00:02Z</updated>
    <pubDate>2026-08-12T11:00:02Z</pubDate>
    <link rel="alternate" type="text/html" href="https://perlmaven.com/punk-perl-mvc-compiled-at-boot" />
    <id>https://perlmaven.com/punk-perl-mvc-compiled-at-boot</id>
    <content type="html"><![CDATA[<h2 class="title is-4">Description:</h2>
<p>In this presentation we will dive into the <a href="https://punkperl.com">Punk</a> ecosystem: an open source MVC web framework with first class openAPI integration, template engine, job queue, json codec, non blocking data layer and http client all built on a highly optimised event-loop web server.</p>
<h2 class="title is-4">Bio:</h2>
<p><a href="https://www.linkedin.com/in/lnation--/">Robert Acock</a> (<a href="https://metacpan.org/author/LNATION">LNATION</a>) is a CPAN author with over 250 contributions. They run their own contracting company, LNATION LTD. They like to experiment with C/XS, writing Perl as fast as it can be.</p>
<h2 class="title is-4">Length</h2>
<p>1 hour</p>
<p><a class="button is-primary" href="https://luma.com/o4k2uute">register</a></p>
]]></content>
    <author>
      <name></name>
    </author>
  </entry>

  <entry>
    <title>Perl development using Codex by Emmanuel Thouraud</title>
    <summary type="html"><![CDATA[]]></summary>
    <updated>2026-08-03T12:40:02Z</updated>
    <pubDate>2026-08-03T12:40:02Z</pubDate>
    <link rel="alternate" type="text/html" href="https://perlmaven.com/perl-development-using-codex-by-emmanuel" />
    <id>https://perlmaven.com/perl-development-using-codex-by-emmanuel</id>
    <content type="html"><![CDATA[<iframe width="560" height="315" src="https://www.youtube.com/embed/l4kBbjgZntU" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>
<p>This was an ad-hoc presentation and thus we did not have an abstract for it.</p>
<ul>
<li><a href="https://www.linkedin.com/in/emmanuel-thouraud/">Emmanuel Thouraud</a></li>
<li><a href="https://github.com/M-M-M-M/perl-agents-md/">AGENTS.md of Emmanuel</a></li>
</ul>
]]></content>
    <author>
      <name></name>
    </author>
  </entry>

  <entry>
    <title>Setup GitHub Actions with Dist::Zilla, how to advance PRs</title>
    <summary type="html"><![CDATA[]]></summary>
    <updated>2026-02-11T08:00:02Z</updated>
    <pubDate>2026-02-11T08:00:02Z</pubDate>
    <link rel="alternate" type="text/html" href="https://perlmaven.com/github-action-with-dist-zilla-video" />
    <id>https://perlmaven.com/github-action-with-dist-zilla-video</id>
    <content type="html"><![CDATA[<iframe width="560" height="315" src="https://www.youtube.com/embed/ciQw5DMvRm8" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>
<ul>
<li>
<p>00:00 Introduction</p>
</li>
<li>
<p>01:30 <a href="https://osdc.code-maven.com/perl">OSDC Perl</a>, mention last week</p>
</li>
<li>
<p>03:00 Nikolai Shaplov <a href="https://metacpan.org/author/NATARAJ">NATARAJ</a>, one of our guests author of <a href="https://metacpan.org/dist/Lingua-StarDict-Writer">Lingua-StarDict-Writer</a> on GitLab.</p>
</li>
<li>
<p>04:30 Nikolai explaining his goals about security <a href="https://github.com/radiator-software/p5-net-ssleay/pull/509">memory leak in Net::SSLeay</a></p>
</li>
<li>
<p>05:58 What we did earlier. (Low hanging fruits.)</p>
</li>
<li>
<p>07:00 Let's take a look at the <a href="https://github.com/radiator-software/p5-net-ssleay">repository of Net::SSLeay</a></p>
</li>
<li>
<p>08:00 Try understand what happens in the repository?</p>
</li>
<li>
<p>09:15 A bit of explanation about adopting a module. (co-maintainer, unauthorized uploads)</p>
</li>
<li>
<p>11:00 <a href="https://pause.perl.org/">PAUSE</a></p>
</li>
<li>
<p>15:30 Check the &quot;river&quot; status of the distribution. (reverse dependency)</p>
</li>
<li>
<p>17:20 You can CC-me in your correspondence.</p>
</li>
<li>
<p>18:45 Ask people to review your pull-requests.</p>
</li>
<li>
<p>21:30 Mention the issue with DBIx::Class and how to take over a module.</p>
</li>
<li>
<p>23:50 A bit about the OSDC Perl page.</p>
</li>
<li>
<p>24:55 <a href="https://cpandashboard.com/">CPAN Dashboard</a> and how to add yourself to it.</p>
</li>
<li>
<p>27:40 Show the issues I opened asking author if they are interested in setting up GitHub Actions.</p>
</li>
<li>
<p>29:25 Start working on <a href="https://metacpan.org/dist/Dancer-Template-Mason">Dancer-Template-Mason</a></p>
</li>
<li>
<p>30:00 clone it</p>
</li>
<li>
<p>31:15 perl-tester Docker image.</p>
</li>
<li>
<p>33:30 Installing the dependencies in the Docker container</p>
</li>
<li>
<p>34:40 Create the GitHub Workflow file. Add to git. Push it out to GitHub.</p>
</li>
<li>
<p>40:55 First failure in the CI which is unclear.</p>
</li>
<li>
<p>42:30 Verifying the problem locally.</p>
</li>
<li>
<p>43:10 Open an issue.</p>
</li>
<li>
<p>58:25 Can you talk about dzil and Dist::Zilla?</p>
</li>
<li>
<p>1:02:25 We get back to working in the CI.</p>
</li>
<li>
<p>1:03:25 Add <code>--notest</code> to make installations run faster.</p>
</li>
<li>
<p>1:05:30 Add the git configuration to the CI workflow.</p>
</li>
<li>
<p>1:06:32 Is it safe to use <code>--notest</code> when installing dependencies?</p>
</li>
<li>
<p>1:11:05 git rebase squashing the commits into one commit</p>
</li>
<li>
<p>1:13:35 <code>git push --force</code></p>
</li>
<li>
<p>1:14:10 Send the <a href="https://github.com/yanick/Dancer-Template-Mason/pull/8">pull-request</a>.</p>
</li>
</ul>
]]></content>
    <author>
      <name></name>
    </author>
  </entry>

  <entry>
    <title>Add META data, .gitignore and GitHub Actions to Common::CodingTools</title>
    <summary type="html"><![CDATA[]]></summary>
    <updated>2026-02-01T22:00:02Z</updated>
    <pubDate>2026-02-01T22:00:02Z</pubDate>
    <link rel="alternate" type="text/html" href="https://perlmaven.com/meta-data-and-github-actions-for-common-codingtools-video" />
    <id>https://perlmaven.com/meta-data-and-github-actions-for-common-codingtools-video</id>
    <content type="html"><![CDATA[<p><a href="https://osdc.code-maven.com/perl">OSDC Perl</a>.</p>
<iframe width="560" height="315" src="https://www.youtube.com/embed/fW3uCc-Vw-g" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>
<ul>
<li>00:00 Introduction to OSDC</li>
<li>01:30 Introducing myself <a href="https://perlmaven.com/">Perl Maven</a>, <a href="https://perlweekly.com/">Perl Weekly</a></li>
<li>02:10 The earlier issues.</li>
<li>03:10 How to select a project to contribute to?</li>
<li>04:50 Chat on <a href="https://osdc.zulipchat.com/">OSDC Zulip</a></li>
<li>06:45 How to select a Perl project?</li>
<li>09:20 <a href="https://cpan-digger.perlmaven.com/">CPAN::Digger</a></li>
<li>10:10 Modules that don't have a link to their VCS.</li>
<li>13:00 Missing CI - GitHub Actions or GitLab Pipeline and Travis-CI.</li>
<li>14:00 Look at Term-ANSIEncode by Richard Kelsch - How to find the repository of this project?</li>
<li>15:38 Switching top look at Common-CodingTools by mistake.</li>
<li>16:30 How MetaCPAN knows where is the repository?</li>
<li>17:52 Clone the repository.</li>
<li>18:15 Use the <a href="https://github.com/szabgab/perl-docker-on-ubuntu/">szabgab/perl</a> Docker container.</li>
<li>22:10 Run <code>perl Makefile.PL</code>, install dependency, run <code>make</code> and <code>make distdir</code>.</li>
<li>23:40 See the generated <code>META.json</code> file.</li>
<li>24:05 Edit the <code>Makefile.PL</code></li>
<li>24:55 Explaining my method of cloning first (calling it <code>origin</code>) and forking later and calling that <code>fork</code>.</li>
<li>27:00 Really edit <code>Makefile.PL</code> and add the <code>META_MERGE</code> section and verify the generated <code>META.json</code> file.</li>
<li>29:00 Create a branch locally. Commit the change.</li>
<li>30:10 Create a fork on GitHub.</li>
<li>31:45 Add the <code>fork</code> as a remote repository and push the branch to it.</li>
<li>33:20 Linking to the PR on the <a href="https://osdc.code-maven.com/perl">OSDC Perl report page</a>.</li>
<li>35:00 Planning to add <code>.gitignore</code> and maybe setting up GitHub Action.</li>
<li>36:00 Start from the <code>main</code> branch, create the <code>.gitignore</code> file.</li>
<li>39:00 Run the tests locally. Set up GitHub Actions to run the tests on every push.</li>
<li>44:00 Editing the GHA configuration file.</li>
<li>48:30 Commit, push to the fork, check the results of GitHub Action in my fork on GitHub.</li>
<li>51:45 Look at the version of the <a href="https://hub.docker.com/r/perldocker/perl-tester/">perldocker/perl-tester</a> Docker image.</li>
<li>54:40 Update list of Perl versions in the CI. See the results on GitHub.</li>
<li>55:30 Show the version number of perl.</li>
</ul>
]]></content>
    <author>
      <name></name>
    </author>
  </entry>

  <entry>
    <title>Perl-related GitHub organizations</title>
    <summary type="html"><![CDATA[A list of GitHub organization containing Perl projects]]></summary>
    <updated>2026-01-31T10:00:02Z</updated>
    <pubDate>2026-01-31T10:00:02Z</pubDate>
    <link rel="alternate" type="text/html" href="https://perlmaven.com/github-organizations" />
    <id>https://perlmaven.com/github-organizations</id>
    <content type="html"><![CDATA[<p>Most projects are started by a single person in a GitHub repository of that person. Later for various reasons people establish GitHub organizations
and move the projects there.
Sometimes the organization contains a set of sub-projects related to a central project. (e.g. A web framework and its extensions or database access.)
Sometimes it is a collection of projects related to a single topic. (e.g. testing or IDE support.)
Sometimes it is just a random collection of project where people band together in the hope that no project will be left behind. (e.g. the CPAN Authors organization.)</p>
<p>Organizations make it easier to have multiple maintainers and thus ensuring continuity of project, but it might also mean that none of the members really
feel the urge to continue working on something.</p>
<p>In any case, I tried to collect all the Perl-related GitHub organizations.</p>
<p>Hopefully in ABC order...</p>
<ul>
<li>
<p><a href="https://github.com/beyondgrep">Beyond grep</a> - It is mostly for <code>ack</code>, a <code>better grep</code> developed by Andy Lester. No public members. 4 repositories.</p>
</li>
<li>
<p><a href="https://github.com/perl-catalyst/">Catalyst</a> - Catalyst is a web-framework. Its runtime and various extensions are maintained in this organization. 10 members and 39 repositories.</p>
</li>
<li>
<p><a href="https://github.com/cpan-authors/">cpan-authors</a> - A place for CPAN authors to collaborate more easily. 4 members and 9 repositories.</p>
</li>
<li>
<p><a href="https://github.com/davorg-cpan">davorg cpan</a> - Organisation for maintaining Dave Cross's CPAN modules. No public members and 47 repositories.</p>
</li>
<li>
<p><a href="https://github.com/exiftool">ExifTool</a> - No public members. 3 repositories.</p>
</li>
<li>
<p><a href="https://github.com/foswiki">Foswiki</a> - The Foswiki and related projects. 13 members and 649 repositories.</p>
</li>
<li>
<p><a href="https://github.com/gitpan">gitpan</a> - An archive of CPAN modules - 2 members and 5k+ read-only repositories.</p>
</li>
<li>
<p><a href="https://github.com/Kelp-framework">Kelp framework</a> - a web development framework. 1 member and 12 repositories.</p>
</li>
<li>
<p><a href="https://github.com/Metacpan">MetaCPAN</a> - The source of the MetaCPAN site - 9 member and 56 rpositories.</p>
</li>
<li>
<p><a href="https://github.com/mojolicious">Mojolicious</a> - Some Perl and many JavaScript projects. 5 members and 29 repositories.</p>
</li>
<li>
<p><a href="https://github.com/moose/">Moose</a> - Moose,<code>MooseX-*</code>, Moo, etc. 11 members and 69 repositories.</p>
</li>
<li>
<p><a href="https://github.com/netdisco">Netdisco</a> - Netdisco and SNMP-Info projects. 10 members and 14 repositories.</p>
</li>
<li>
<p><a href="https://github.com/PadreIDE">PadreIDE</a> - Padre, the Perl IDE. 13 members and 102 repositories.</p>
</li>
<li>
<p><a href="https://github.com/paracamelus">Paracamelus</a> - No public members. 2 repositories.</p>
</li>
<li>
<p><a href="https://github.com/Perl/">Perl</a> - Perl 5 itself, Docker images, etc. 20 members, 8 repositories.</p>
</li>
<li>
<p><a href="https://github.com/perl-actions/">Perl Actions</a> - GitHub Actions to be used in workflows. 5 members and 9 repositories.</p>
</li>
<li>
<p><a href="https://github.com/perladvent/">Perl Advent Calendar</a> - including the source of <a href="https://perl.com/">perl.com</a>. 3 members and 8 repositories.</p>
</li>
<li>
<p><a href="https://github.com/Perl-Bitcoin">Perl Bitcoin</a> - Perl Bitcoin Toolchain Collective. 3 members and 7 repositories.</p>
</li>
<li>
<p><a href="https://github.com/Perl-Toolchain-Gang">Perl Toolchain Gang</a> - ExtUtils::MakeMaker, Module::Build, etc. 27 members and 41 repositories.</p>
</li>
<li>
<p><a href="https://github.com/PerlToolsTeam/">Perl Tools Team</a> - source of planetperl , perl-ads  etc. No public members. 6 repositories.</p>
</li>
<li>
<p><a href="https://github.com/PerlDancer/">Perl Dancer</a> - Dancer, Dancer2,  many plugins. 30 members and 79 repositories.</p>
</li>
<li>
<p><a href="https://github.com/perltidy">perltidy</a> - Only for Perl::Tidy. No public members. 1 repository.</p>
</li>
<li>
<p><a href="https://github.com/perl5-dbi/">perl5-dbi</a> - DBI, several <code>DBD::*</code> modules, and some related modules. 7 members and 15 repositories.</p>
</li>
<li>
<p><a href="https://github.com/perlorg/">perl.org</a> - also cpan.org and perldoc.perl.org. 3 members and 7 repositories.</p>
</li>
<li>
<p><a href="https://github.com/Perl5">Perl5</a> - DBIx-Class and DBIx-Class-Historic. No public members. 2 repositories.</p>
</li>
<li>
<p><a href="https://github.com/perl5-utils/">perl5-utils</a> - List::MoreUtils, File::ShareDir etc. 2 members and 22 repositories.</p>
</li>
<li>
<p><a href="https://github.com/Perl-Critic">Perl-Critic</a> - PPI, Perl::Critic and related. 7 members and 5 repositories.</p>
</li>
<li>
<p><a href="https://github.com/perl-ide">perl-ide</a> - Perl Development Environments. 26 members and 13 repositories.</p>
</li>
<li>
<p><a href="https://github.com/perl-pod">perl-pod</a> - Pod::Simple, Test::Pod. 1 member and 4 repositories.</p>
</li>
<li>
<p><a href="https://github.com/PerlPkgConfig">PkgConfig</a> - 1 member 1 repository.</p>
</li>
<li>
<p><a href="https://github.com/plack/">plack</a> - psgi-specs, Plack and a few middlewares. 5 members and 7 repositories.</p>
</li>
<li>
<p><a href="https://github.com/RexOps">RexOps</a> - Rex, Rexify and related projects. 1 member and 46 repositories.</p>
</li>
<li>
<p><a href="https://github.com/sqitchers/">Sqitch </a> - Sqitch for Sensible database change management and related projects. No public members. 16 repositories.</p>
</li>
<li>
<p><a href="https://github.com/StrawberryPerl/">StrawberryPerl</a> - The Perl distribution for MS Windows. 4 members and 10 repositories.</p>
</li>
<li>
<p><a href="https://github.com/Test-More">Test-More</a> - Test::Builder, Test::Simple, Test2 etc. - 4 members, 27 repositories.</p>
</li>
<li>
<p><a href="https://github.com/EnlightenedPerlOrganisation">The Enlightened Perl Organisation</a> - Task::Kensho and <code>Task::Kensho::*</code>. 1 member and 1 repository.</p>
</li>
<li>
<p><a href="https://github.com/Thunderhorse-Framework">Thunderhorse Framework</a> - a modern web development framework. No public members. 4 repositories.</p>
</li>
<li>
<p><a href="https://github.com/webmin">Webmin</a> - Webmin is a web-based system administration tool for Unix-like servers. - 5 repositories.</p>
</li>
</ul>
<h2 class="title is-4">Companies</h2>
<p>These are bot Perl-specific GitHub organizations, but some of the repositories are in Perl.</p>
<ul>
<li>
<p><a href="https://github.com/cpanel">cPanel</a> - Open Source Software provided by cPanel. 1 member and 22 repositories.</p>
</li>
<li>
<p><a href="https://github.com/orgs/duckduckgo/">DuckDuckGo</a> - The search engine. 19 members and 122 repositories.</p>
</li>
<li>
<p><a href="https://github.com/fastmail">Fastmail</a> - Open-source software developed at Fastmail. 4 members and 38 repositories.</p>
</li>
<li>
<p><a href="https://github.com/RotherOSS">RotherOSS</a> - Otobo (OTRS fork). No public members. 47 repositories.</p>
</li>
</ul>
]]></content>
    <author>
      <name></name>
    </author>
  </entry>

  <entry>
    <title>Lock and unlock hash using Hash::Util</title>
    <summary type="html"><![CDATA[lock_hash and unlock_hash to avoid accidental changes]]></summary>
    <updated>2026-01-28T18:00:02Z</updated>
    <pubDate>2026-01-28T18:00:02Z</pubDate>
    <link rel="alternate" type="text/html" href="https://perlmaven.com/lock-and-unlock-hash" />
    <id>https://perlmaven.com/lock-and-unlock-hash</id>
    <content type="html"><![CDATA[<p>If you don't like the <a href="/autovivification">autovivification</a> or simply would like to make sure the code does not accidentally alter a
hash the <a href="https://metacpan.org/pod/Hash::Util">Hash::Util</a> module is for you.</p>
<p>You can <code>lock_hash</code> and later you can <code>unlock_hash</code> if you'd like to make some changes to it.</p>
<p>In this example you can see 3 different actions commented out.
Each one would raise an exception if someone tries to call them on a locked hash.
After we unlock the hash we can execute those actions again.</p>
<p>I tried this both in perl 5.40 and 5.42.</p>
<p><strong><a href="https://github.com/szabgab/perlmaven.com/tree/main/examples/locking_hash.pl">examples/locking_hash.pl</a></strong></p>
<pre><code class="language-perl">use strict;
use warnings;
use feature 'say';

use Hash::Util qw(lock_hash unlock_hash);
use Data::Dumper qw(Dumper);


my %person = (
    fname =&gt; &quot;Foo&quot;,
    lname =&gt; &quot;Bar&quot;,
);
lock_hash(%person);

print Dumper \%person;
print &quot;$person{fname} $person{lname}\n&quot;;
say &quot;fname exists &quot;, exists $person{fname};
say &quot;language exists &quot;, exists $person{language};

# $person{fname} = &quot;Peti&quot;;     # Modification of a read-only value attempted
# delete $person{lname};       # Attempt to delete readonly key 'lname' from a restricted hash
# $person{language} = &quot;Perl&quot;;  # Attempt to access disallowed key 'language' in a restricted hash

unlock_hash(%person);

$person{fname} = &quot;Peti&quot;;     # Modification of a read-only value attempted
delete $person{lname};       # Attempt to delete readonly key 'lname' from a restricted hash
$person{language} = &quot;Perl&quot;;  # Attempt to access disallowed key 'language' in a restricted hash

print Dumper \%person;

</code></pre>
<pre><code class="language-perl">$VAR1 = {
          'lname' =&gt; 'Bar',
          'fname' =&gt; 'Foo'
        };
Foo Bar
fname exists 1
language exists
$VAR1 = {
          'language' =&gt; 'Perl',
          'fname' =&gt; 'Peti'
        };
</code></pre>
]]></content>
    <author>
      <name></name>
    </author>
  </entry>

</feed>

