We're all used to working with arrays to implement queues and stacks using
pop. They allow you to keep your data nice and tidy, well-ordered and predictable.
But life isn't nice and tidy, well-ordered or predictable.
We need something in our programming language that reflects the mess of the real world.
Enter the concept of the Pile. A pile, like a stack, allows you to add data to it, as well as retrieving it. But, rather than using the neat
push, you use
Adding data is done using the
mush operator. You can mush arbitrary collections of data into a pile.
Retrieving data is done with the
mop operator. When mopping data from a pile, you can specify how many items to mop (i.e. the "capacity").
The first problem with this new data type is to find a proper sigil for piles. Since Perl supports unicode, I would suggest U+1F4A9. This would give us:
*** German version below ***
In life or professional life, there are cycles of learning by starting over again or at least partially. If you are a good Perl 5 developer and you start Perl 6, you start again as a beginner. In my professional life, these cycles have never been longer than 7 years. That's why I'm not afraid of Perl 6.
Perl is being developed by community. So I do not need to worry about Perl disappearing from the market with the bankruptcy of a company at short notice. The community also has disadvantages, especially in marketing. The programming language Perl is strongly undervalued by the public.
This is a quick update to yesterday's Dancer2 release to fix a couple of minor issues reported by the community. Please see the Changes file for details.
Thank you for the swift feedback! We are targeting an official release on or before April 20th.
It is support day here at the Dist-Pen
Today I am going to look a the [Support] section plug-in. This is one of the more fancy plug-in that I have looked as so far as it tries to add in not one section but up to four all under the 'Support' section.
The four are 'Perl Doc', 'Websites', 'Bugs / Feature Requests' and 'Source Code'
Obviously this plug-in will be very useful on large projects that may need for all four of the sections or perhaps the lazy programer who wants to cover off a number of things with only one plug-in.
The first thing I have to do is get rid of all the similar content I have been adding over the past few posts
and then for starters just add in the default like this
I then installed the plug-in and then the good old clean and build with dzil to get
Well, thanks to all the generous donations, we've reached 71% of our initial target at exactly half-way through the campaign!!
We have decided to set a stretch goal. If we surpass our minimum $2,500 USD and get up to $4,000 USD, we will be adding three new chapters.
Timm will add one on Infrared Remote Control, and another focusing on using MQTT: a machine-to-machine (M2M)/"Internet of Things" connectivity protocol.
I will add a chapter that will step-by-step explain how to read and understand the relevant portions of a datasheet for an Integrated Circuit (IC) or some form of sensor, how to communicate/manipulate and otherwise act on the device's registers in C, the process of converting the working C code into XS, and finally creating a new Perl distribution for the device.
Thank you for all of the support!
Here is a routine from a module I made to extract the variables from a module so they can be put into Perl documentation:
A trial release of Dancer2 (0.206000_01) was just uploaded, and should be available on your local mirror soon. This release addresses some couple of potential security exploits, and could use some scrutiny prior to an official release.
Please see the release for the full list of changes.
There will be a coordinated Dancer/Dancer2 release in the near future with more detail. In the meanwhile, the more eyes on this, the better. Please leave us your feedback through the usual channels (IRC, email, github, etc.).
Thanks. Keep dancing!
Post-ette day here in the Dist-Pen
Today I am going to have a quick look at the [Requires] section plug-in. As the name implies this plug-in will add in a 'Requires' section in your POD. It will snoop though your '.pm' and '.pl' files with 'Module::Extract::Use' and lists these out.
Now I do have large number of uses in my code so I gave it a quick go by first installing the plug-in and then adding
[Generic / SYNOPSIS]
[Generic / DESCRIPTION]
to my 'weaver.ini' file and then after a dzil clean and build I get;
It is Legal day again here in the Dist-Pen.
So a quick look today at three section plug-ins all dealing with the LEGAL section of you pod. All three offer the same basic output as the [Legal] sections we saw in this post, buit each adds a little.
So to start lets have a look at [Legal::Complicated] the name is a little misleading as the plug-in is easy to use and by complicated it meas that the license holder is more complicated that a single author. This plug-in is best used when code is coming from an organization where ownership is shared between the organization and the writer of the code.
This plug-in works with comment tags your add to any of the PODs you want to have extra content on. There are three you can use '# AUTHOR:', '# OWNER:' and '#LICENSE:'. I don't really have a use for this plug-in in my project but here is an example of how to use it.
Still stuck in weaver land here in the Dist-pen
Today I am going to look at [GenerateSection] section plug-in. This one look very interesing to me as it lets on generate a section from with-in the 'weaver.ini' file.
Now in my case I would love to have a common header and footer for my Tutorial pod without having to add the same section over and over again in each POD doc. I am hoping that this plug-in will get most if not all of what I need.
Right now I am just going to go for a simple all text version for now as I am not 100% sure how to get extra variable content into Dist::Zilla and Pod::Weaver.
So I would like to get something like this
=head3 Database::Accessor Tutorial
Welcome to Page xxxxx
where xxxx is the current page name,
To set this up I will need to add the following into my 'weaver.ini' file
First time ever attended Perl Workshop outside of London. The 20th German Perl Workshop was held in Gummersbach this year, 3rd-7th Apr.
Back to do some more Sections here in the Dist-pen today.
Today I am going to look at three plug-ins the very simple [Extends] the equally simple [MooseExtends] the little different [MooseConsumes]
The first two do what you would expect. Create an 'EXTENDS' section in your POD that lists all the modules that your '.pm' file is based on.
The first one [Extends] loops though the '@isa' and plucks the information from there. Now for kicks I installed this one and added it to my 'weaver.ini' and I got
=item * L<Moose::Meta::Class::__ANON__::SERIAL::37>
after a clean an build, So this is not a plug-in that I would use with a Moose class.
Next I gave [MooseExtends] a go and for some reason I get
=item * L<Moose::Meta::Class::__ANON__::SERIAL::37>
yet again. Now the problem here is I do not extend my '
So it is Moose day here in the Dist-Pen
So I am finally back to Moose after many many days with Dist::Zilla and Pod::Weaver as to today I am going to see how I can use the Moose::MOP, Dist:Zill and Pod::Weaver all together.
What I am look at today is the [Consumes] section plug-in which is suppose to run out read the meta-classes of my Moose objects and then print out all the Roles that a class consumes. I am not sure what results I will get but is should be fun to see.
So all I need to do is add this in my 'weaver.ini'
[Generic / OVERVIEW]
[Collect / ATTRIBUTES]
and after I install it with cpan and do the old clean and build with dzil I get
=item * L<Database::Accessor::Types>
in my Accessor.pm which is perfectly correct as in that file I have
It is C round up day today in the Dist-Pen.
In my last post I had a look at [Contributors] section plug-in and today I am going to look at not one but three plug-ins
- CollectWithAutoDoc and
This simple plug-in lets you do your own 'Comment' sections like we have seen with [Name] and [Contributors]. It works in much the same way as the [Collect] plug-in, you supply the 'name' for the section and then a 'key' to match on.
For example if I want to have a section for 'Notes' for any comments I may make I could do that by adding this into my 'Weaver.ini' file
[Region / postlude]
++[CommentString / Notes]
++comment = Note
and then in my POD files I could add a comment like this
# Note: Bob's Bargain Basement of Floppies it the best place to get these
anywhere outside the POD comment and after the usual insall of the plug-in and the dzil clean and build I get
Sawyer X's March 5-25 2018 Perl 5 Porters Mailing list summary
put out a call for macOS smoke testers. I thought I would see how
far I could get putting one together from the Test-Smoke docs.
The following is not a blow-by-blow (painful and uninteresting to
read), but rather what I came up with after a few false starts,
with emphasis on what I did over and above the
documentation, and (sometimes) why.
- macOS 10.13 High Sierra
- Custom-built Perl installed system-wide in custom directory
- CPAN client (not cpanp or cpanm) configured to
Following is the p5p (Perl 5 Porters) mailing list summary for the past week.
I hope you had a nice easter weekend.
I had another busy month and worked about 25 hours on YAML.
Still stuck in Section mode here at the Dist-Pen
Carrying from my last post today I am going to look at the [Contributors] section plug-in. This particular plug-in is of little value so for to my 'Database::Accessor' project as I have no other people working on it with me but one can always dream big that I may have some helpers as time goes on. So it is is work a look.
I wanted to see if anyone else is using this plug-in so I did a Reverse Dependency look up and found that there are thirty-six other distributions that use this so I have few places where I can go an peek and see how it is being used.
It boy scout day here in the Dist-Pen.
In may last post I had final look the various [Bug] section plug-ins so today I am going to look at Merit-badges. I am really talking about that great feeling you had when you earned your first badge in Cubs, Brownies or Young Pioneers. You know the ones I mean the ones for learning to build a fire, sew on a badges, help an old man across the street or showing true will in conforming with the collective.
You can get the same feeling all over again in the programming world as well. All joking aside the [Badge] section plug-in is a quick way to get visual display information to potential users of your software such as this;
So at a glace you know it is passing its testing and you need at least perl 5.10 to use it.
It is the big bug round up day here at the Dist-Pen
In my last post I had a look at the [Bugs] section plug-in for Pod::Weaver, following along that line I am going to look at a three similar ones;
All are just a variation on the [Bugs] plug-in and none of them have the 'header' attribute. I will give you the .25$ trour;
This plugin requires that you enter the 'bugtracker' key-value pairs under the 'resources' meta key and you can do that by either using the [Bugtracker] or the [MetaResources] to set these values up for you. With my present 'dist.ini' it will produce the following output
=head1 BUGS AND LIMITATIONS
You can make new bug reports, and view existing ones, through the
web interface at L<https://github.com/byterock/database-accessor/issues>
as you can see it does not care about the email address.