MyApp->config(using_frontend_proxy => 1);
Camelia
The Camelia image is copyright 2009 by Larry Wall. Permission to use
is granted under the Artistic License 2.0, or any subsequent version
of the Artistic License.
The Camelia image is a trademark of Larry Wall, and permission is
granted for non-exclusive use to label anything related to Perl 6,
provided the image is labeled as a trademark when used as a main logo
on a page. (It is not necessary to so label icons, or other casual
uses not related to business.) Such labeling may be done either by
footnote or with a TM mark.
It is recommended that such a TM mark be in a light but visible color
of gray.
Camelia is intended primarily to represent Perl 6, The Language,
not any other aspect of Perl 6 culture, corporate or otherwise.
In particular, various implementations and distributions are free to
use their own logos and/or mascots.
Certain variants are also permissible; since Camelia knows how to
change her wing colors at will, any color scheme (or lack thereof)
in the same pattern is fine. She just happens to like bright colors
most of the time because they make her happy. But she's willing to
blend in where necessary. :)
Going to the other extreme, a textual variant also exists:
»ö«
Many other variants are possible. Have fun. Good taste and positive
connotations are encouraged, but cannot of course be required.
Those of you who think the current design does not reflect good taste
are entitled to your opinion. We will certainly allow you to change
your mind later as you grow younger. :)
From: Larry Wall
Date: March 24, 2009 10:25
Subject: Re: Logo considerations
[...] I think there's a tendency to
go way too abstract in most of these proposals. I want something
with gut appeal on the order of Tux. In particular I want a logo
for Perl 6 that is:
Fun
Cool
Cute
Named
Lively
Punable
Personal
Concrete
Symmetric
Asymmetric
Attractive
Relational
Metamorphic
Decolorizable
Shrinkable to textual icon
Shrinkable to graphical icon
In addition, you can extend just about anything by attaching "P6"
wings to it. I also take it as a given that we want to discourage
misogyny in our community. You of the masculine persuasion should
consider it an opportunity to show off your sensitive side. :)
Hence, Camelia.
Larry
From: Larry Wall
Date: March 25, 2009 11:28
Subject: Re: Logo considerations - 3 logos needed
On Wed, Mar 25, 2009 at 08:54:34AM -0400, __ wrote:
: I think he was offering it as an example and a suggestion. The perl6
: community might favor it out of respect for Larry but I think he went
: out of his way to make it clear that it's the kind of thing he would
: like.
Yes, I went out of my way to indicate that my mind was still open
(a little). However, if you will allow an old geezer to be a wee bit
testy, I would also like to make it clear that I'm a just a little
tired of these "rounds"; more importantly, that I've been mulling
over this particular issue for many years. I didn't just come up
with that list of requirements off the cuff. I'm old enough to have
lots of stuff on my cuff as well.
Also, it's probably mere hubris, but I already consider myself to be a
"professional designer". I know how to take into account the various
factors that a professional designer would take into account when
designing yet another highly original logo that somehow ends up looking
just like every other logo out there. You'll notice that "sterility"
is not on my list of requirements. It was a deliberate omission.
So let me summarize the requirements into a meta-requirement:
The new logo must make Larry at least as happy as Camelia does.
That is the extent to which my mind is still open... :-)
Larry
my $caller_method_with_namespace = (caller(0))[3];
my ($method) = $caller_method_with_namespace =~ /([^::]*)$/;
Use the init_arg
attribute configuration (see "Constructor parameters" in Moose::Manual::Attributes):
package SOD::KuuAnalyze::ProdId;
use Moose;
has 'users' => (
isa => 'ArrayRef[Str]', is => "ro",
init_arg => undef, # do not allow in constructor
);
1;
$randInt = Math::NumberCruncher::RandInt(10,50);
Returns a random integer between the two number passed to the function, inclusive. With no parameters passed, the function returns either 0 or 1.
These days, public discussion can seem really difficult and painful. Trolls making deliberately destructive comments, exaggerated dramatic statements and even abuse seems common, whether the discussion is online or in-person.
Many of us have experienced real pain and suffering in these discussions. How can we stop it?
Individuals and communities can take action to keep honest and valuable discussions from degenerating into useless drama. In this talk, Ruth shares ideas for managing your own perceptions of what is happening in a rancorous conversation. She shares a framework that enables you and your communities to vaccinate your discussions against trolls and drama, reclaiming useful public discourse for us all.
The Perl Foundation (TPF) is passionate about helping our software communities flourish.
Jump in a time machine and let's see some suggestions for how we can improve Perl, Raku and TPF's branding.
use utf8;
does not enable Unicode output - it enables you to type Unicode in your program. Add this to the program, before your print()
statement:
binmode(STDOUT, ":utf8");
See if that helps. That should make STDOUT
output in UTF-8 instead of ordinary ASCII.
package Foo {
use Moo;
has a => (is => "ro");
has b => (is => "ro");
}
my $bar = Foo->new(a => 42);
# Print only 'a'
say $_ for keys %{ $bar }
# Print all attributes
say $_ for keys( %{
'Moo'->_constructor_maker_for('Foo')->all_attribute_specs
});
# don't forget this if you want to output utf8 characters
binmode(STDOUT, ":utf8");
# don't forget this if you want to output utf8 characters
binmode(STDOUT, ":utf8");
This blog post describes a model that we found useful for talking about CPAN dependencies and reverse dependencies at the QA Hackathon. At the head of the river is Perl itself with the core modules. The river flows into the sea, which contains all distributions that aren't used by any other distribution. Other distributions sit somewhere along the river, their position determined by their reverse dependencies. This post introduces the core concepts, but nothing more.
Remember the saying from Perl-people? "We suck at marketing". Well, not all of us. Some of us are rather good at marketing. Some well-known Perl heroes are good at what they do and good at promoting that, and promoting Perl at the same time. I do my bit and it seems to be appreciated every now and then. I will tell you what I do for marketing Perl, what I think the effect of that is, and how easy it is for you to join me to show other people how awesome Perl is. I will mention some of my Perl heroes, YAPC's, Fosdem, workshops, PM meetings, tuits, buttons, stickers, and more.
A persistent key-value store for fast storage environments.
RocksDB is an embeddable persistent key-value store for fast storage.
UnQLite is a in-process software library which implements a self-contained, serverless, zero-configuration, transactional NoSQL database engine. UnQLite is a document store database similar to MongoDB, Redis, CouchDB etc. as well a standard Key/Value store similar to BerkeleyDB, LevelDB, etc.
UnQLite is an embedded NoSQL (Key/Value store and Document-store) database engine. Unlike most other NoSQL databases, UnQLite does not have a separate server process. UnQLite reads and writes directly to ordinary disk files. A complete database with multiple collections, is contained in a single disk file. The database file format is cross-platform, you can freely copy a database between 32-bit and 64-bit systems or between big-endian and little-endian architectures. UnQLite features includes:
Column-store features
When your database grows into millions of records spread over lots of tables and used in business or science data warehouse applications, you really want a column-store database management system.
MonetDB innovates at all layers of a DBMS, e.g. a storage model based on vertical fragmentation, a modern CPU-tuned query execution architecture, automatic and self-tuning indexes, run-time query optimization, and a modular software architecture.
# Loading from __DATA__
my @hosts = <DATA>;
chomp @hosts;
# => ["coucou.com", "coco.com", "cici.com", "chichi.com", "cucu.com", "cece.com" ]
__DATA__
coucou.com
coco.com
cici.com
chichi.com
cucu.com
cece.com
# Loading from file ./hosts
use Mojo::File;
my $file = Mojo::File->new('hosts');
my @hosts = grep { $_ ne '' } grep { $_ !~ m/^#/ } split '\n', $file->slurp;
# => ["coucou.com", "coco.com", "cici.com", "chichi.com", "cucu.com", "cece.com" ]
# ./hosts
# Deals with comments and blank lines
coucou.com
coco.com
# More hosts
cici.com
chichi.com
cucu.com
cece.com
Three weird tricks to make your object-oriented codemore encapsulated, more reusable, and more maintainable.
App::UpdateCPANfile reads cpanfile, pin dependencies, update dependencies and write back to cpanfile.
an overview of Type::Tiny
Perl 5 with modern defaults
Useful One-Line Scripts for Perl Jul 11 2018 | version 1.11 |
---|
Compiled by Peteris Krumins (peter@catonmat.net, @pkrumins on Twitter)
http://www.catonmat.net -- good coders code, great reuse
Latest version of this file is always at:
http://www.catonmat.net/download/perl1line.txt
This file is also available in other languages:
Chinese: https://github.com/vinian/perl1line.txt
Please email me peter@catonmat.net if you wish to translate it.
Perl One-Liners on Github:
https://github.com/pkrumins/perl1line.txt
You can send me pull requests over GitHub! I accept bug fixes,
new one-liners, translations and everything else related.
I have also written "Perl One-Liners Explained" ebook that's based on
this file. It explains all the one-liners here. Get it at:
http://www.catonmat.net/blog/perl-book/
No Starch Press has published "Perl One-Liners" as a real book too:
http://nostarch.com/perloneliners
Slides of Tim Bunce's talk on Devel::NYTProf and optimizing perl code at YAPC::NA in June 2014. It covers use of NYTProf and outlines a multi-phase approach to optimizing your perl code.
:dromedary_camel: List of resources about Perl.
:dromedary_camel: List of resources about Perl.
My favorite "failed" project: I was with a company that decided to rewrite a Perl project in C++ because Perl was too slow.
glot.io lets you run and share snippets.
Snippets can be saved as either public or secret. Public snippets will show up in /snippets and will be found by search engines. Secret snippets can only be accessed by those who know the url.
Code is executed inside a temporary container without a network connection. Execution time is limited to 15 seconds and the output can not exceed 100KiB. Memory is limited to 500MB.
Ace is used as the code editor. Make sure to check out the leftmost and rightmost tabs, where you can select language version, set a custom run command and change the editor keybindings.
Are you missing your favorite library or language? Issues and pull requests are gladly accepted here.
BUILD
is called after the constructor, which makes it handy to verify state but not necessarily useful to format incoming arguments.
BUILDARGS
would let you modify incoming arguments before the constructor is called, which makes it a better fit for this case. Your attribute is read-only, so this could work.
But... if you're hungry for static typing, why would you stop after promising "this is a string"? If you create a subtype for ISO8601 strings, you can promise "this is a string and it has X format". Even better, you're doing that in a way that's immediately and trivially portable to other attributes.
I rather doubt the regex below will work for you, but I hope it will get the point across:
#define the type
subtype 'iso8601',
as 'Str',
where { /\d{4}-\d{2}-\d{2}/ },
message { "Not a valid ISO8601 string ($_)" };
#provide a coercion
coerce 'iso8601',
from 'Str',
via { _format_as_iso8601 $_ };
#tell moose to coerce the value
has startdate => (is => 'ro', isa => 'iso8601', required => 1, coerce => 1);
Last Christmas, the inimitable Matt Trout (mst) created an opinionated tour of CPAN where he recommended modules for some common problems. I think its brilliant, useful, and entertaining and I’ve decided to compile a high level overview all on one page in order to create a quick reference.
I’ve tried to distill his wisdom and wit down to a few words. But I recommend clicking the section headers and following the links to Matt’s original posts to see his actual real opinions in their full complexity. This single page can’t replace 16 great posts and he usually includes advice on the best way to use the module. You won’t want to miss that.
'(flycheck-perl-include-path
(quote
("your path to your perl libraries")))
'(flycheck-perl-executable "path to your perl executable")
I've been looking at Gitlab's CI pipeline to automate testing and deployment of a Perl App I've been writing.
Gitlab's documentation on the subject is very comprehensive https://docs.gitlab.com/ee/ci/pipelines.html however there's no Perl example https://docs.gitlab.com/ee/ci/examples/README.html so I did a bit of playing to get a working configuration for those who are interested.
Gitlab makes it extremely easy to use their CI by creating a gitlab-ci.yml file to control the pipeline.
This library provides numerous functional programming utility methods, as well as functional varients of native in-built methods, to allow for consistent, concise code.
Online text tools is a collection of useful text processing utilities. All text tools are simple, free and easy to use. There are no ads, popups or other garbage. Just text utilities that work right in your browser. And all utilities work exactly the same way — load text, get result.
It has always been painful to do ASCII diagrams by hand. This perl application allows you to draw ASCII diagrams in a modern (but simple) graphical interface.
The ASCII graphs can be saved as ASCII or in a format that allows you to modify them later.
A simple status dashboard.
In shell, you can do it in many ways:
cat input | xargs echo | tr ' ' ,
or
perl -pe 's/\r?\n/,/' input > output
I know you wanted this to be longer, but I don't really see the point of writing multi line script to solve such simple task - simple regexp (in case of perl solution) is fully workable, and it's not something artificially shortened - it's the type of code that I would use on daily basis to solve the issue at hand.
WebPerl uses the power of WebAssembly and Emscripten to let you run Perl in the browser!
WebPerl does not translate your Perl code to JavaScript, instead, it is a port of the perl binary to WebAssembly, so that you have the full power of Perl at your disposal!
<script src="webperl.js"></script>
<script type="text/perl">
print "Hello, Perl World!\n"; # goes to JavaScript console by default
js('document')->getElementById('my_button')
->addEventListener('click', sub {
js('window')->alert("You clicked the button!");
} );
</script>
Module::Starter - a simple starter kit for any module
use Inline::Perl5;
use DBI:from<Perl5>;
my $dbh = DBI.connect('dbi:Pg:database=test');
my $products = $dbh.selectall_arrayref(
'select * from products', {Slice => {}}
);
Module for executing Perl 5 code and accessing Perl 5 modules from Perl 6.
Supports Perl 5 modules including XS modules. Allows passing integers, strings, arrays, hashes, code references, file handles and objects between Perl 5 and Perl 6. Also supports calling methods on Perl 5 objects from Perl 6 and calling methods on Perl 6 objects from Perl 5 and subclass Perl 5 classes in Perl 6.
The perl package now uses a versioned path for compiled modules. This means that modules built for a non-matching perl version will not be loaded any more and must be rebuilt.
A pacman hook warns about affected modules during the upgrade by showing output like this:
WARNING: '/usr/lib/perl5/vendor_perl' contains data from at least 143 packages which will NOT be used by the installed perl interpreter.
-> Run the following command to get a list of affected packages: pacman -Qqo '/usr/lib/perl5/vendor_perl'
You must rebuild all affected packages against the new perl package before you can use them again. The change also affects modules installed directly via CPAN. Rebuilding will also be necessary again with future major perl updates like 5.28 and 5.30.
Please note that rebuilding was already required for major updates prior to this change, however now perl will no longer try to load the modules and then fail in strange ways.
If the build system of some software does not detect the change automatically, you can use perl -V:vendorarch in your PKGBUILD to query perl for the correct path. There is also sitearch for software that is not packaged with pacman.
MySQLTuner is a script written in Perl that allows you to review a MySQL installation quickly and make adjustments to increase performance and stability. The current configuration variables and status data is retrieved and presented in a brief format along with some basic performance suggestions.
MySQLTuner supports in this last version ~250 indicators for MySQL/MariaDB/Percona Server.
MySQLTuner is maintained and indicator collect is increasing week after week supporting a lot of configurtion sush as:
Unless you are a MySQL performance tuning expert, it can be enormously challenging and somewhat overwhelming to locate and eliminate MySQL bottlenecks. While many DBAs focus on improving the performance of the queries themselves, this post will focus on the highest-impact non-query items: MySQL Server Performance and OS Performance for MySQL.
The following regular expression is a deliverable email address:
; Mailbox from RFC 5321, as amended
P E J DEA = ([A-Za-z0-9!#-'*+\-/=?^_`{-~\xA0-\x{10FFFF}]+
(?:\.[A-Za-z0-9!#-'*+\-/=?^_`{-~\xA0-\x{10FFFF}])|
"(?:[ !#-\[\]-~\xA0-\x{10FFFF}]|\\[ -~])*")@
((?:[A-Za-z0-9](?:[A-Za-z0-9\-]*[A-Za-z0-9])?|
[\x00-\x{10FFFF}]*[\x80-\x{10FFFF}]+[\x00-\x{10FFFF}]*)
(?:\.(?:[A-Za-z0-9](?:[A-Za-z0-9\-]*
[A-Za-z0-9])?|[\x00-\x{10FFFF}]*
[\x80-\x{10FFFF}]+[\x00-\x{10FFFF}]*))*)
In the regular expression DEA, capturing group 1 is the local-part
production, and capturing group 2 is the domain production.
#Uploading Your First Module to CPAN brian d foy The Perl Review YAPC::EU 2011
modules@perl.org
module-authors@perl.org
cpansearch@perl.org
How to upgrade your Gravatar picture on MetaCPAN
Percona XtraBackup is the world’s only open-source, free MySQL hot backup software that performs non-blocking backups for InnoDB and XtraDB databases. With Percona XtraBackup, you can achieve the following benefits:
Backups that complete quickly and reliably
Uninterrupted transaction processing during backups
Savings on disk space and network bandwidth
Automatic backup verification
Higher uptime due to faster restore time
Percona XtraBackup makes MySQL hot backups for all versions of Percona Server, MySQL, and MariaDB. It performs streaming, compressed, and incremental MySQL backups.
Percona XtraBackup works with MySQL, MariaDB, and Percona Server. It supports completely non-blocking backups of InnoDB, XtraDB, and HailDB storage engines. In addition, it can back up the following storage engines by briefly pausing writes at the end of the backup: MyISAM, Merge, and Archive, including partitioned tables, triggers, and database options.
Percona’s enterprise-grade commercial MySQL Support contracts include support for Percona XtraBackup. We recommend support for critical production deployments.
Percona XtraBackup is an high performance, low-profile and non-blocking open-source backup utility for InnoDB and XtraDB databases.
Currently is the only open-source tool that performs backups on 'MySQL-based' servers (MySQL, MariaDB, Percona Server) that doesn't lock your database during it. Backups are online, and queries and transactions continue to run without interruption ('hot backups').
It can back up data from InnoDB, XtraDB, and MyISAM tables on MySQL 5.0 and 5.1 servers, and it has many advanced features like partial, remote, compressed and incremental backups, multi-threaded file copying for performance and Point-in-time recovery.
RapidApp talk and live demo presented at YAPC::NA 2015 in Salt Lake City on June 9th.
RapidApp is a PSGI-compatable, open-source web toolkit and framework based on Catalyst, ExtJS, Template::Toolkit and DBIx::Class for quickly creating interactive, data-rich webapps and components.
Pflogsumm is a log analyzer for Postfix. It can mail out a summery on a daily, weekly or monthly basis and is fully configurable. The generated report can show you patterns in email traffic so you can better determine bandwidth limitations, mail server abusers or if your mail server needs to be upgraded. Statistics can be very helpful in showing, for example, when most of your mail is sent or received or if that one mail user is sending out more than their fair share of mail. Pflogsumm will give you the ability to quickly determine what machines on your network are the top (ab)users and the proof to follow up company policies with numbers.
Pflogsumm is a single perl file and its only dependancies are perl, the perl module Date::Calc (which is probably already installed on your system) and the proper location of a Postfix log file.
pflogsumm.pl is designed to provide an over-view of postfix activity, with just enough detail to give the administrator a "heads up" for potential trouble spots. The following is an over-view of the reports produced.
Use split with a regex that matches anything.
my @arr = split //, "abcd";
Want to see what's inside a variable in a complete, colored and human-friendly way?
use Data::Printer; # or just "use DDP" for short
p @array; # no need to pass references
Code above might output something like this (with colors!):
[
[0] "a",
[1] "b",
[2] undef,
[3] "c",
]
You can also inspect objects:
my $obj = SomeClass->new;
p($obj);
Which might give you something like:
\ SomeClass {
Parents Moose::Object
Linear @ISA SomeClass, Moose::Object
public methods (3) : bar, foo, meta
private methods (0)
internals: {
_something => 42,
}
}
Take a look at App::module::version
$ module-version
The version of App::module::version in /home/yourself/perl5/lib/perl5 is 1.004