view release on metacpan or search on metacpan
you have. You must make sure that they, too, receive or can get the
source code. And you must tell them their rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License Agreement applies to any program or other work which
contains a notice placed by the copyright holder saying it may be
the Program under this License. However, parties who have received
copies, or rights to use copies, from you under this General Public
License will not have their licenses terminated so long as such parties
remain in full compliance.
5. By copying, distributing or modifying the Program (or any work based
on the Program) you indicate your acceptance of this license to do so,
and all its terms and conditions.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the original
licensor to copy, distribute or modify the Program subject to these
terms and conditions. You may not impose any further restrictions on the
recipients' exercise of the rights granted herein.
7. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
cost, duplication charges, time of people involved, and so on. (You will
not be required to justify it to the Copyright Holder, but only to the
computing community at large as a market that must bear the fee.)
- "Freely Available" means that no fee is charged for the item itself, though
there may be fees involved in handling the item. It also means that
recipients of the item may redistribute it under the same conditions they
received it.
1. You may make and give away verbatim copies of the source form of the
Standard Version of this Package without restriction, provided that you
duplicate all of the original copyright notices and associated disclaimers.
2. You may apply bug fixes, portability fixes and other modifications derived
from the Public Domain or from the Copyright Holder. A Package modified in such
a way shall still be considered the Standard Version.
3. You may otherwise modify your copy of this Package in any way, provided that
you insert a prominent notice in each changed file stating how and when you
changed that file, and provided that you do at least ONE of the following:
a) place your modifications in the Public Domain or otherwise make them
devdata/https_mojolicious.io_blog_2018_12_01_welcome-mojoconf-recap_ view on Meta::CPAN
<p><iframe allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen frameborder="0" height="480" src="https://www.youtube.com/embed/1tPAfgE3CbU" width="854"></iframe></p>
<h3>Mojolicious 8.0 Announcement</h3>
<p>Mojolicious Project founder and lead developer Sebastian Riedel presented "Eight Point Oh".
Though it is ostensibly an announcement of the 8.0 release, it is more properly a recap of the features added to Mojo since 7.0.
It isn't just Mojolicious either, several spin-off projects are also mentioned.</p>
<p><iframe allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen frameborder="0" height="480" src="https://www.youtube.com/embed/nYlFprRybzA" width="854"></iframe></p>
<p>(Edit: This post originally stated that the talk included changes since 5.0.
While that had originally been the planned, there were so many features added since 7.0, covering from 5.0 up was dropped.)</p>
<h3>My Own Worst Enemy</h3>
<p>On another personal note, I love including working code and doing live demos in talks.
I know the former risks bordom but I fell it is important for people to be able to see how code really works in practice.
Because of that fear, I like live demos because it <a href="https://youtu.be/dDH10srLgVc?t=343">engages the audience</a> and makes code-heavy talks more physical.</p>
<p>Of course everyone knows the problems of live demos!
Fear that they might fail in all kinds of embarrasing ways must surely be why more people don't attempt them.
Well this time I hit the most embarrassing of them all.</p>
devdata/https_mojolicious.io_blog_2018_12_02_automatic-reload-for-rapid-development_ view on Meta::CPAN
<time class="date" datetime="2018-12-02">Dec 2, 2018</time>
</p>
</div>
<div class="post-thumb">
<!-- theme suggests 1300x500 -->
<img alt="Mojolicious art and reload icon, original artwork by Doug Bell" src="/blog/2018/12/02/automatic-reload-for-rapid-development/banner.jpg">
</div>
<div class="post-content">
<section id="section-1">
<p>Developing webapps with <a href="http://mojolicious.org">Mojolicious</a> is a lot of fun!
Using <a href="https://mojolicious.org/perldoc/morbo">the <code>morbo</code> server</a> for
development, every change to my webapp causes a restart to load my changes.
This way the next request I make has all my new code!</p>
devdata/https_mojolicious.io_blog_2018_12_07_openapi_ view on Meta::CPAN
<div class="post-content">
<section id="section-1">
<p>During this years <a href="http://www.olafalders.com/2018/11/21/metahack-3-wrap-report/">meta::hack 3</a>, I was extremely fortunate to work with <a href="https://twitter.com/joelaberger">Joel Berger</a> on integrating/documentin...
<h2>What is it?</h2>
<p>OpenAPI is a specification for designing, documenting, validating and driving your RESTful API. It can be used to provide documentation to an existing API, or when creating a new one.</p>
<p>The OpenAPI Specification originated as the Swagger specification and was renamed to separate the API description format (OpenAPI) from the open source tooling (Swagger). The specification moved into a new GitHub repository, but did not change.</p...
<p>In the case of the MetaCPAN API, we set out to provide documentation to the existing API, but quickly moved into supporting validation to API calls as well.</p>
</section>
<section id="section-2">
<h2>The tools</h2>
<p>OpenAPI has many tools available to help, including discovery tools that will assist in writing the specification. We chose to write the definition by hand (in vim of course) and use tools to generate the documentation and to integrate the specifi...
<ul>
devdata/https_mojolicious.io_blog_2018_12_10_minion-stands-alone_ view on Meta::CPAN
<time class="date" datetime="2018-12-10">Dec 10, 2018</time>
</p>
</div>
<div class="post-thumb">
<!-- theme suggests 1300x500 -->
<img alt="Minion logo in front of a faded Mojolicious cloud, original artwork by Doug Bell" src="/blog/2018/12/10/minion-stands-alone/banner.jpg">
</div>
<div class="post-content">
<section id="section-1">
<p>The <a href="https://mojolicious.org/perldoc/Minion">Minion job queue</a> is an
incredibly useful tool, but sometimes I need to use it for non-web
projects. So, how can I use Minion without needing
a <a href="http://mojolicious.org">Mojolicious</a> web application?</p>
devdata/https_mojolicious.io_blog_2018_12_11_who-watches-the-minions_ view on Meta::CPAN
<time class="date" datetime="2018-12-11">Dec 11, 2018</time>
</p>
</div>
<div class="post-thumb">
<!-- theme suggests 1300x500 -->
<img alt="Minion logo in the middle of binocular circles, original artwork by Doug Bell" src="/blog/2018/12/11/who-watches-the-minions/banner.jpg">
</div>
<div class="post-content">
<section id="section-1">
<p>Now that I have a <a href="https://mojolicious.org/perldoc/Minion">Minion job
queue</a>, I need to take care of
it properly. Are the workers working (have they seized the means of
production)? Are jobs completing successfully? Are there any errors?
What are they?</p>
devdata/https_mojolicious.io_blog_2018_12_14_a-practical-example-of-mojo-dom_ view on Meta::CPAN
<p>3D models and drawings are fantastic tools, but in reality things are not so perfect. Construction tolerances being what they are, our company relies a lot on <a href="https://www.youtube.com/watch?v=H-uNzEmt5sw">laser scanning</a>, where we go o...
<p>The problem is when our 3D modeling software (<a href="https://www.tekla.com/products/tekla-structures">Tekla Structures</a>) processes the point clouds, it changes the file names of each one from something human readable, such as <code>Pipe Rack ...
<p><img alt="Point clouds add information that is not available in the 3D model" src="pointcloud1.jpg">
<em>Point clouds provide critical information that is either too difficult or too costly to model directly</em></p>
<p>Fortunately, Tekla uses a lot of standard file formats that anyone can edit â including using XML to describe each point cloud it has processed. Of course, I could just hand edit them to change the names, but that would have to be done for e...
<p>Conveniently, the XML file contains both the hash name and the original file name â so I knew I could use Mojo::DOM to parse the XML and rename the point clouds to be human readable. This simple task is the perfect example of how Mojolicious ...
<pre><code>#!/usr/bin/perl
use Mojo::Base -strict;
use Mojo::Util qw(getopt);
use Mojo::File;
use Mojo::DOM;
getopt 'p|path=s' => \my $path;
sub main {
devdata/https_mojolicious.io_blog_2018_12_14_a-practical-example-of-mojo-dom_ view on Meta::CPAN
<p>And of course, <a href="https://mojolicious.org/perldoc/Mojo/DOM">Mojo::DOM</a> makes finding the right values in the XML easy - it also handles HTML and CSS selectors. Basically, I just iterate through the contents of <code>PointCloudData</code>...
<pre><code>for my $e ($dom->find('PointCloudData')->each) {
$e->{Folder} = rename_files($e) and $e->{Hash} = '' if $e->{Hash};
}
</code></pre>
<p>I only run <code>rename_files</code> if <code>Hash</code> is populated, and if it is, I empty it so I don't try to rename them again. <code>rename_files</code> is about the only Perl code I had to write myself - almost everything else was cop...
<p>A substitution stores the desired file & folder name in <code>$newname</code> (non-destructive modifier <code>/r</code> allows me to work on a copy of <code>$e</code> without changing the original). Then I simply rename the point cloud folder...
<pre><code>my $newname = $e->{Folder} =~ s/$e->{Hash}/$e->{Name}/r;
</code></pre>
<p>When I'm finished renaming the point clouds, I use <a href="https://mojolicious.org/perldoc/Mojo/File">Mojo::File</a> to save the contents of <code>$dom</code> back to <code>pointclouds.xml</code> with one line:</p>
<pre><code>$file->spurt($dom)
</code></pre>
<p>The neat thing is, when I altered the contents of <code>$e->{Folder}</code> and <code>$e->{Hash}</code> in my loop, saving it back just works - I don't need to think too much about the XML structure at all. Interestingly, saving <code>$...
devdata/https_mojolicious.io_blog_2018_12_15_practical-web-content-munging_ view on Meta::CPAN
toc: false
draft: false
---
This release includes a fog-flavored bauble of three equal sides, providing
the restless digital spirits a brief respite from their painful awareness of
impermanence.
You can find the new version under the usual shadowy bridge.
</code></pre>
<p>So, to start out, I need to fetch the old site. I could have bothered the old maintainer of the site about it and gotten the original sources, but I decided just to fetch them from the web. One option would be to use wget or curl; the stuff we do ...
<pre><code>use Mojo::UserAgent;
my $url = 'intro';
my $ua = Mojo::UserAgent->new;
my $tx = $ua->get("example.tld/$url.html");
</code></pre>
<p>That's it! We just fetched a web page. You might be tempted to print out $tx to see what's in it (that's what I did, rather than reading the docs, at first). But, it's a <a href="https://mojolicious.org/perldoc/Mojo/Transaction/HTT...
devdata/https_mojolicious.io_blog_2018_12_15_practical-web-content-munging_ view on Meta::CPAN
<pre><code>use HTML::WikiConverter;
my $wc = new HTML::WikiConverter(dialect => 'Markdown');
my $md = $wc->html2wiki( $para );
</code></pre>
<p>Done!</p>
<h2>Generating the Metadata</h2>
<p>As we saw earlier, Hugo posts have metadata that precede the Markdown content, and contains information like author information, date of publication, description, etc. Some are optional, but some are mandatory (and I need dates so I can show the m...
<p>I'm going to gloss over how the <code>@entries</code> data structure was built, but I will mention that it's an array of hashes containing the three pieces of data we found above. I'll also link to a GitHub repo with the real world cod...
<pre><code>use Mojo::File;
use String::Truncate qw(elide);
for my $e (@entries) {
my $desc = elide($e->{'text'}, 100, {at_space => 1});
my $md = <<"EOF";
---
devdata/https_mojolicious.io_blog_2018_12_24_async-await-the-mojo-way_ view on Meta::CPAN
my $title = trim $tx->res->dom->at('title')->text;
say $title;
})->wait;
</code></pre>
<p>However that's slightly different.
The promise above resolved with the title, this one resolves with the transaction.
That brings us to the next interesting feature of promises: the return value of <code>then</code> is another promise that is resolved with the return value of the callback.
Additionally, if that value is another promise then they chain, if not then it resolves with the value.</p>
<p>We can use that property to replicate the original promise example above more directly like this</p>
<pre><code>my $promise = $ua->get_p($url)->then(sub ($tx) {
return trim $tx->res->dom->at('title')->text;
});
$promise->then(sub ($title) {
say $title;
})->wait;
</code></pre>
devdata/https_mojolicious.io_blog_2018_12_25_special-thanks_ view on Meta::CPAN
I want to thank my employer <a href="https://www.servercentral.com/">ServerCentral</a> who not only are great to work for and support open source, but who gave me lots of time to get settled in with the newest member of my family (and a few cute gift...
I want to thank Sebastian Riedel for writing Mojolicious and for the outfit you see on Jude in the picture above (as far as I know, it is a unique piece), and the entire Mojolicious Core Team and community.</p>
<p>I want to thank Jude for being a reasonably happy newborn and sleeping for longer-than-average stretches at night.</p>
<p>Finally, I extend my warmest thanks to the doctors, nurses and staff of Northwest Community Hospital in Arlington Heights, Illinois and especially the NICU nurses who are beyond amazing.</p>
<p>Merry Christmas, Happy Holidays, Happy New Year, and Happy Perling!</p>
</section>
<small><p>Image: "Jude Carl Berger", original work by Joel Berger, licensed <a href="https://creativecommons.org/licenses/by-nc-nd/4.0/">CC BY-NC-ND 4.0</a>.</p>
</small>
<p class="tags">
<span>Tagged in </span>:
<a href="/blog/tag/advent/">advent</a>
</p>
<div class="bio cf">