| Subcribe via RSS

I Made a New Thing in Perl

January 1st, 2017 | 2 Comments | Posted in CPAN, Perl, Software

(For now, I’m going to casually ignore the fact that it has been literally two years since my last blog posting. If this post heralds a return to regular blogging, I may address that in a future post.)

I made a new thing in Perl: YASF, or Yet Another String Formatter. I’m rather happy with it, even though I suspect that no one else is using it yet. I’m happy mostly because it’s the first new module idea that I’ve been able to actually turn into real code, in several years. The “why” of this is somewhat complicated, but can best be summed up in six words: Deep depression, self doubt, strong medications.

So what is it, and what does it do?

It’s a lightweight string-formatter module inspired by the format method of strings in Python, with a little syntactic sugar based on Python’s % operator for string formatting. It scratches a particular itch I’ve had for some time now: why do I keep writing (basically) the same hash-based search-and-replace regular expressions over and over? By which I mean something like:

my $pattern =
    'This is a string with one {key1} followed by another {key2}.';
my $hash = { key1 => 'value', key2 => 'different value' };

(my $string = $pattern) =~ s/{(\w+)}/$hash->{$1}/ge;

Now, this is a fairly convoluted example, but it gets at the point: this is a very common pattern. And it is usually not this straightforward; you probably have a series of value-sets that you would want to substitute into $pattern in order to get a new $string value, otherwise you would just use the hash values directly when declaring $pattern. Maybe your pattern is a global value made read-only by Readonly or Const::Fast. There are (I imagine) more reasons for wanting to do this than I can think of by myself. But I had already run into enough reasons on my own that I wanted to do something about it.

Coincidentally, around the most-recent time that I found myself writing something for this pattern yet again I was also learning Python for a task I was given at my day-job. I was looking at an existing code base and tracking down the elements and constructs that I didn’t immediately recognize in O’Reilly & Associates’ Learning Python. In the process, I stumbled upon two elements of Python that I thought were rather nifty: the string % operator, and the format method. The operator was the earlier of the two features, and is essentially an implementation of printf that takes the format pattern on the left of the operator and a list of values on the right, and puts them in according to printf-style format specs in the pattern.

But the format method, which came later, it’s a much different beast. It can do quite a bit more than the operator. Place-holders in the pattern can be named keys pointing into a dictionary (hash), or numbered indices into an array. And the range of formatting that can be applied to each interpolated value is quite a bit more extensive than what printf offers. Now, while I realize that the main impetus for Python’s string-formatting is that they don’t do in-string interpolation of variables the way Perl does, I still saw this as a possibly useful micro-templating approach. Imagine if the example above had looked more like this:

my $pattern =
    'This is a string with one {key1} followed by another {key2}.';
my $hash = { key1 => 'value', key2 => 'different value' };

my $string = $pattern % $hash;

OK, that’s still pretty contrived. And I’m not too good these days at making up examples that look like real-world problems. But consider this:

use URI;
use Const::Fast;

const $SPECBLOCK =>
    "Site: {name}\nProtocol: {url.scheme}\nPort: {url.port}\n" .
    "Host: {url.host}\n";

while (($name, $url) = splice @data, 0, 2) {
    my $block = $SPECBLOCK % { name => $name,
                               url  => URI->new($url) };
    print "$block\n";
}

That has a little more meat to it, yeah? And the use of an object as a value that can have methods called on it, that’s something that the Python format does, so surely a Perl copy should do so as well.

But there’s a catch: you can’t really do the above with Perl strings, because they aren’t objects derived from a class that you can monkey-patch. So I had to come up with a class, instead, to add the functionality to:

use URI;
use Const::Fast;
use YASF;

const $SPECBLOCK => YASF->new(
    "Site: {name}\nProtocol: {url.scheme}\nPort: {url.port}\n" .
    "Host: {url.host}\n"
);

while (($name, $url) = splice @data, 0, 2) {
    my $block = $SPECBLOCK % { name => $name,
                               url  => URI->new($url) };
    print "$block\n";
}

That will work. But wait, there’s more! And at no extra charge!

Because the format patterns are now objects, I can do things with them, to them, and on them. And the first thing I did, was introduce the concept of binding a data structure to the object to use as a default source if you had places where explicitly providing a binding wasn’t feasible. This opened up the ability to overload more operators, most notably the stringification operator:

use URI;
use Const::Fast;
use YASF;

const $SPECBLOCK => YASF->new(
    "Site: {name}\nProtocol: {url.scheme}\nPort: {url.port}\n" .
    "Host: {url.host}\n"
);

my %binding;
$SPECBLOCK->bind(\%binding);

while (($name, $url) = splice @data, 0, 2) {
    @binding{qw(name url)} = ($name, URI->new($url));
    print "$SPECBLOCK\n";
}

Again, even with more meat that is still a fairly contrived example, and a line or two longer than the previous version. But consider the following snippet:

use DBI;
use YASF;

# Set up database connection, then declare $sth as a fetch
# statement

# Declare $str as a YASF object with the pattern you want, with
# each field from the fetch statement available as a value in the
# pattern.

my %row;
$str->bind(\%row);
$sth->execute;
$sth->bind_columns( \( @row{ @{$sth->{NAME_lc} } } ));
while ($sth->fetch) {
    print "$str\n";
}

I based that off of the example in the DBI manual page of binding database columns directly to values inside a hash. I haven’t tested it yet, but I plan to add some tests to the distro soon, runnable when the user installing the module has DBD::SQLite available.

Anyway, there’s a lot more to the module, even though it is currently only at version 0.004. If this seems interesting, feel free to check it out on CPAN and/or GitHub. There are a few current caveats:

  1. Version 0.004 does not have any of the Python-ish formatting support, it only does expression substitution. If you put a format in as with Python, it will be quietly ignored for now. I am working on formatting right now, and hope to have a version 0.005 out before long.
  2. I still consider this alpha-quality software, and as such I may yet change some elements of the interface. In particular…
  3. …I’m debating whether to take the separate bind and binding methods and roll them into a single method. On the one hand, “bind” is more of a verb and thus a little more meaningful for the action of assigning bindings. On the other hand, most users (I suspect) would expect the same method that makes the bindings to return the current bindings. So this may change, especially once (if) other people start using this and give me some feedback.
  4. Lastly, I’m not too fond of the name “YASF”. I’m crap at naming things, and wrestled with this one for well over a month before a friend suggested “Yet Another String Formatter”. I would definitely entertain better suggestions, with the limitation that they need to be meaningful and (relatively) short. A long name with 2 or 3 parts to the namespace belies the general simplicity that I am aiming for.

I hope that someone (besides me) finds this useful.

(Afterthought: It feels good to write in this blog again. I do hope I can continue to do so in 2017…)

Tags: , , , ,

Some Observations on the eBay for iPad 3.4.0 App

December 31st, 2014 | 2 Comments | Posted in Uncategorized

(This is a copy of an “issue” I posted on the eBay Mobile forum on getsatisfaction.com. The original is here. As it happens, some of the more “divisive” posts and comments in the forum are being deleted, so I am making a copy here in case they choose to delete it there.)

 

(TL;DR version: the 3.4.0 version of the app makes some very dubious interface/experience decisions, and you are quickly losing your power-users)

Dear Ginger et al,

Since the release of the 3.4.0 version of the eBay iPad app, there has been a tremendous amount of discussion, almost all negative, here on this forum. I would like to present some of my own concerns and observations in a (hopefully) more even tone.

First, a bit of background: I’m not quite sure when I first joined eBay as a user, but it’s been in the neighborhood of 20 years. My eBay ID is “randy.j.ray”, and while I haven’t sold a lot of stuff I do have a pretty good feedback rating. So I’ve been using eBay since long before mobile devices were even a thing. My professional background is in software engineering with an emphasis on web-based applications. I’ve been developing web content and web applications since 1993. I do not (and cannot) claim to be an expert in UI/UX issues (user interface/user experience issues), but I have my fair share of experience in creating interfaces and experiences (as well as my fair share of bad design decisions). So I’m not just a typical dissatisfied user of the app, I am looking at it with a critical, professional eye.

The redesign of the app is a failure.

Your own chief product officer, R.J. Pittman, said in an article on re/code that the goal was to make the app look more like Pinterest and less like Amazon. His actual words were, “I’m happy to openly use the Pinterest model as an example.” I don’t understand this– Pinterest is not really a commerce site, whereas Amazon is one of the leading commerce sites on the web. I’m not saying that you should emulate Amazon, nor am I saying that there are not people using Pinterest for commerce purposes. But it seems counter-intuitive to choose something like Pinterest as a model for an app that is intended to be focused on buying and selling things.

For years, I used eBay through the website interface because that was really all there was, save for some platform-specific applications (usually Windows-based, and I don’t run Windows). During this time, my usage pattern for eBay was generally:

  • I need something
  • A Google search leads me to eBay
  • I use eBay’s searching capabilities to try finding the best price
  • I buy the item

Note that I don’t list “browse generally for anything that might interest me” in that list. This was not very easy to do on the website, so I rarely (if ever) did it.

Then a few years ago I bought an iPad, and one of the apps that I happened across for it was the eBay app. I installed it out of curiosity and fired it up. It was amazing! Suddenly, searching and browsing were significantly easier than they had ever been on the website. The endless scrolling of items in a category or search was (and is) highly addictive. Being able to easily jump to a seller’s other items and have the same scrolling experience led to a lot of impulse purchases. (Hey! This seller consolidates shipping! What else can I buy?) But what really made the app for me, was the ability to place “shortcuts” on the primary screen for various searches and categories that I regularly used/browsed. From the feedback I’ve seen on this forum, this feature was the real “killer feature” for your app, because it seems to be the feature that people are most upset over losing.

Well, that and the introduction of “curated content” into the app’s home-screen. Your impression of content to promote has no relation (that I can reason) to my shopping preferences. There are fashions, jewelry, etc. being offered to me when I have never even browsed any of those categories, let alone spent the kind of money that I have on my preferred categories. When I first ran the new app, I thought it must have lost my login credentials, when I saw all that unrelated stuff being put in front of me. But nothing I did could get rid of it. It wasn’t a bug, it was a feature.

What was worse, was the lack of my saved searches on said home-screen. Not only was I being bombarded with useless (to me) content, the content I did want was no longer easily available. I say “easily”, because as you have pointed out it is still reachable. Only now it takes 3 clicks/taps to reach a saved search, instead of just 1. Huh? At what point did someone decide that 3x the effort to perform a common function was an improvement?

Someone (I forget who) said in a different online article that the app was meant to be released after Christmas, but it had tested “so well” with beta users that it was pushed out early. Who were these beta users? Were they regular users of the 3.3.X line of the eBay app? Or were they people with little to no previous experience with eBay apps, who were judging the app without any past context? I can see how the app might look fine to someone who had not used a previous version, but did you engage any of your “power users” in the beta cycle? Because you are losing these users on a daily basis, and I’m not sure if you’re even aware of it.

Which brings up my last complaint: the responsiveness of your staff who are responsible to replying to users specifically in this forum. There has been a real lack of responsiveness here, and when someone has responded it often comes across as condescending. For example, there have been several cases where someone would say (and I am paraphrasing here), “I don’t like that the saved searches have been moved,” and the response (again, paraphrasing) would be, “Oh, you can’t find saved searches? Well just tap here, then here, then…” The user never said they couldn’t find the feature, they were unhappy with having to tap three times for something that was previously directly available on the home screen. But the responses we’ve been getting from your representatives seem to not really be looking at the issue at hand, but rather assuming that we just don’t know how to operate the app. To be frank, it’s insulting.

I’ll stop at this point, because I feel I’ve addressed all the salient points. It seems to me that you made a wholesale change to the fundamental usage-pattern of your app, but without actually considering the users themselves. And in the process, you have angered and alienated a large number of them. Perhaps not enough of them are leaving for you to notice. Perhaps there have been enough new users, people who received iPads for Christmas and have never seen the previous version of the app for comparison, that you consider the lost users an acceptable rate of churn. I don’t know. For my part, I’ve used iTunes to restore the 3.3.1 version of the app and am once again happily buying more things than I probably should be. But if you should fully deprecate the 3.3.X line (by making a non-portable API change, etc.) and force me into the new model of app, I’ll simply quit spending money on eBay (as so many people have already chosen to do). There is very little that I find on eBay that I cannot find elsewhere; it’s just easier to find on eBay. But if you take away that easiness, then why shouldn’t I just go straight to other storefronts?

Please consider what I have said here, at least think about it. Your users are, or at least have been in the past, fiercely loyal to you. That sort of loyalty should be valued, not squandered.

Randy J. Ray
Sunnyvale, CA

Tags: ,

Atom Editor Invites

March 20th, 2014 | No Comments | Posted in GitHub, Software

I have two invites for the beta of the Atom editor under development by GitHub. I haven’t played with it enough yet to know whether it is spiffy, or if so how spiffy it indeed is.

Two things to know if you are interested in trying it out:

  • It currently is only available for MacOS. Appears to be compatible with Mountain Lion and Mavericks only, as well.
  • You will have to register via your GitHub account, assuming you have one. Then again, if you are considering test-driving an editor like this then you probably have a GH account…

If you are interested, email me at my primary address (rjray <at> blackperl.com). I will send invites to the first two respondents, using the email address you email from. Do not comment on this post for an invite, as the email notification goes to a different account that I do not check as often.

Tags: ,

Perl Module Release: RPC-XML 0.78

February 6th, 2014 | No Comments | Posted in CPAN, Perl, Software, XML
Version: 0.78
Released: Thursday February 6, 2014, 08:00:00 PM -0800

Changes:

  • lib/RPC/XML.pm

A patch to loop detection in smart_encode from Dag-Erling Smørgrav. Some other minor bits.

  • lib/RPC/XML/Procedure.pm

RT #83108: Fixed a spelling error. Some other fixes, too.

  • lib/RPC/XML.pm

RT #86187: Force key-ordering in struct as_string and serialize. Was getting some intermittent bug reports of failures in t/15_serialize.t that amounted to the keys in a fault struct not being in consistent order.

  • lib/RPC/XML.pm
  • t/15_serialize.t

Undo the previous change and fix the test. The previous change didn't feel right, so this rolls it back and fixes the problem at the level of the test, instead.

  • Makefile.PL
  • lib/RPC/XML.pm
  • lib/RPC/XML/Client.pm
  • lib/RPC/XML/Server.pm

Replace direct evals for loading optional modules with Module::Load. Required adding this to Makefile.PL because Module::Load is not core in 5.8.8. Also did some slight doc tweaking.

  • lib/RPC/XML.pm
  • lib/RPC/XML/Client.pm

Merge pull request #5 from alexrj/utf8-encode. Use utf8::encode() instead of utf8::downgrade().

  • lib/RPC/XML.pm
  • lib/RPC/XML/Client.pm
  • lib/RPC/XML/Server.pm

Finish the uft8 encode vs. downgrade change from the previous commit. Changed in places that were overlooked, and adjusted the version number in all three modules.

  • lib/RPC/XML.pm
  • lib/RPC/XML/Parser/XMLLibXML.pm

Merge pull request #6 from dctabuyz/master. Added 'no_blanks' libxml option to skip blank XML::LibXML::Text nodes.

  • lib/RPC/XML/Server.pm

Merge pull request #7 from kvar/master. Initialize $do_compress in RPC::XML::Server between requests.

  • lib/RPC/XML.pm
  • lib/RPC/XML/Parser/XMLLibXML.pm
  • lib/RPC/XML/Server.pm

Bump version numbers on modules changed in github pulls.

Tags: , , ,

Perl Module Release: RPC-XML 0.77

September 3rd, 2012 | No Comments | Posted in CPAN, Perl, Software, XML
Version: 0.77
Released: Monday September 3, 2012, 12:00:00 PM -0700

Changes:

  • t/15_serialize.t

Fix a test failure on Windows.

  • lib/RPC/XML.pm

RT #70408: Fix spelling error in man page, reported by Debian group.

  • t/90_rt54183_sigpipe.t

Fix to handle cases where server creation fails. Now skips the tests rather than dying.

  • lib/RPC/XML/Client.pm

RT #67486: Add port to Host header in client requests.

  • lib/RPC/XML/Server.pm

RT #65341: Added “use” of forgotten library File::Temp. This was causing failure when “message_file_thresh” kicked in.

  • t/10_data.t

RT #78602: Changed 64-bit test from use64bitint to longsize. On some systems (such as OS X), use64bitint can be true even when in 32-bit mode.

  • t/21_xml_libxml.t

Fix from Christian Walde, skip passed test on Windows.

  • lib/RPC/XML/Server.pm
  • t/40_server.t

Checkpoint refactoring and additional tests. Work is not complete here, but the Net::Server changes demand immediate attention

  • t/20_xml_parser.t

RT #72780: Check for a possible parser failure. One instance of XML::Parser failing to parse the extern entities test. Cannot reproduce, so wrap it in a “skip” block for now.

  • lib/RPC/XML/Procedure.pm
  • t/30_method.t

RT #71452: Correct handling of dateTime parameters. Existing code in lib/RPC/XML/Procedure.pm did not properly handle parameters of the dateTime.iso8601 type. Also, there were no tests for these.

  • MANIFEST
  • t/30_method.t (deleted)
  • t/30_proceudre.t (added)

Renamed t/30_method.t to t/30_procedure.t.

  • lib/RPC/XML/Server.pm

RT #77992: Make RPC::XML::Server work with Net::Server again, after the API changes of Net::Server 2.x.

Tags: , , ,

Perl Module Release: Image-Size 3.231

May 23rd, 2012 | No Comments | Posted in CPAN, Perl, Software
Version: 3.231
Released: Wednesday May 23, 2012, 11:30:00 PM -0700

Changes:

  • lib/Image/Size.pm

Small change to swfmxsize for short-buffer issues.

  • lib/Image/Size.pm

Multiple changes in this commit: Abandoned AutoLoader; moved POD to the end of the file now that all the per-format subroutines are part of the file-proper; fixed cases where lack of ImageMagick would cause the error message to be overwritten.

  • t/all.t
  • t/kazeburo-bar.jpg (added)

New test (and image) for JPG tag-offset issue.

  • lib/Image/Size.pm

Applied patch from github user kazeburo: bug fix for some jpeg files

  • imgsize

Fixed so that default output now catches errors. Previously, you would get an “undefined” warning if there was an error in parsing/sizing the input file.

  • lib/Image/Size.pm

Turns out the 4 bounding-box ints for EMF are signed.

Tags: , , ,

Perl Module Release: Test-AgainstSchema 0.100

January 17th, 2012 | 2 Comments | Posted in CPAN, Perl, Software
Version: 0.100
Released: Monday January 16, 2012, 02:00:00 PM -0800

Changes:

  • lib/Test/AgainstSchema.pm (added)
  • lib/Test/AgainstSchema/XML.pm (added)
  • t/10_xml/05_xml_parsing.t (added)
  • t/10_xml/10_sgmldtd.t (added)
  • t/10_xml/20_xmlschema.t (added)
  • t/10_xml/30_relaxng.t (added)
  • t/10_xml/basic_tests.pl (added)
  • t/10_xml/simple-bad.dtd (added)
  • t/10_xml/simple-bad.rng (added)
  • t/10_xml/simple-bad.xsd (added)
  • t/10_xml/simple.dtd (added)
  • t/10_xml/simple.rng (added)
  • t/10_xml/simple.xsd (added)
  • t/10_xml/xml-simple-bad.xml (added)
  • t/10_xml/xml-simple.xml (added)
  • t/90_integration/10_with_xml.t (added)
  • t/90_integration/90_empty_subclass.t (added)
  • t/90_integration/MyTestAgainstSchema.pm (added)
  • t/util.pl (added)
  • xt/00_load.t (added)
  • xt/01_pod.t (added)
  • xt/02_pod_coverage.t (added)
  • xt/03_meta.t (added)
  • xt/04_minimumversion.t (added)
  • xt/05_critic.t (added)

Initial commit of code, tests and test files.

Tags: , , , ,

Perl Module Release: RPC-XML 0.76

August 21st, 2011 | No Comments | Posted in CPAN, Perl, Software
Version: 0.76
Released: Saturday August 20, 2011, 06:30:00 PM -0700

Changes:

  • etc/make_method
  • lib/RPC/XML/Server.pm

RT #70258: Fixed typos in docs pointed out by Debian team.

  • lib/Apache/RPC/Server.pm

Better version of the fix for infinite loops. This is the patch originally suggested by Eric Cholet, who found the bug.

  • t/00_load.t

RT #70280: This test was still testing RPC/XML/Method.pm. Rewrote to remove that but include the (forgotten) XMLLibXML.pm module. That test has to be conditional on the presence of XML::LibXML.

  • Makefile.PL
  • t/51_client_with_host_header.t

Clean up test suite to work with older Test::More. Also specify a minimum Test::More that supports subtest(). This is also a part of RT #70280.

  • t/11_base64_fh.t
  • t/20_xml_parser.t
  • t/21_xml_libxml.t
  • t/40_server.t

These tests had failures when run as root. Permissions-based negative tests were incorrectly passing.

  • t/10_data.t

Moved the 64-bit “TODO” tests to a SKIP block. Non-64-bit systems will skip, rather than fail, these tests.

  • lib/RPC/XML/Server.pm

RT #65616: Fix for slow methods killing servers. Applied and modified patch from person who opened the ticket.

  • MANIFEST
  • lib/RPC/XML.pm
  • t/10_data.t
  • t/14_datetime_iso8601.t (added)

RT #55628: Improve flexibility of date parsing. This adds the ability to pass any ISO 8601 string to the RPC::XML::datetime_iso8601 constructor.

Tags: , , ,

Perl Module Release: RPC-XML 0.75

August 14th, 2011 | No Comments | Posted in CPAN, Perl, Software, XML

MetaCPAN.org: https://metacpan.org/release/RJRAY/RPC-XML-0.75

Version: 0.75
Released: Saturday August 13, 2011, 05:30:00 PM -0700

Changes:

  • MANIFEST

Somehow, t/13_no_deep_recursion.t never got added to MANIFEST.

  • lib/RPC/XML/Parser/XMLLibXML.pm

RT #65154: Fixed a cut/paste error in an error message.

  • lib/RPC/XML/Client.pm
  • t/51_client_with_host_header.t (added)

RT #68792: Merge pull request #2 from dragon3/master (https://github.com/dragon3). Allow setting of “Host” header, and test suite for it.

  • MANIFEST
  • t/51_client_with_host_header.t

Added new test suite to MANIFEST, fixed spelling. Also added “plan tests” line to the test suite.

  • lib/RPC/XML/Parser/XMLLibXML.pm
  • t/20_xml_parser.t
  • t/21_xml_libxml.t
  • t/41_server_hang.t

Merge pull request #3 from yannk/master (https://github.com/yannk). Expat parser subclass is protected against ext ent attack, libxml isn’t.

  • t/41_server_hang.t

Undo a change to this suite from yannk’s pull.

  • etc/make_method
  • lib/Apache/RPC/Server.pm
  • lib/Apache/RPC/Status.pm
  • lib/RPC/XML.pm
  • lib/RPC/XML/Client.pm
  • lib/RPC/XML/Function.pm
  • lib/RPC/XML/Method.pm
  • lib/RPC/XML/Parser.pm
  • lib/RPC/XML/Parser/XMLLibXML.pm
  • lib/RPC/XML/Parser/XMLParser.pm
  • lib/RPC/XML/ParserFactory.pm
  • lib/RPC/XML/Procedure.pm
  • lib/RPC/XML/Server.pm

More perlcritic-driven clean-up. This is mostly POD sections, but also includes heavy re-working of etc/make_method and parts of lib/RPC/XML.pm.

  • lib/RPC/XML/Parser/XMLLibXML.pm
  • t/21_xml_libxml.t

Fixed external entity handling on MacOS. Also made small change to the test suite to be cleaner.

  • lib/RPC/XML/Parser/XMLLibXML.pm
  • lib/RPC/XML/Parser/XMLParser.pm

Took out warnings on external entities blocking. Now it blocks silently. Also cleaned up some docs.

  • t/15_serialize.t

Additions to increase code coverage in XML.pm.

  • lib/RPC/XML.pm

Turns out this wasn’t exporting RPC_I8.

  • lib/Apache/RPC/Server.pm
  • lib/Apache/RPC/Status.pm
  • lib/RPC/XML.pm
  • lib/RPC/XML/Client.pm
  • lib/RPC/XML/Function.pm
  • lib/RPC/XML/Method.pm
  • lib/RPC/XML/Parser.pm
  • lib/RPC/XML/Parser/XMLLibXML.pm
  • lib/RPC/XML/Parser/XMLParser.pm
  • lib/RPC/XML/ParserFactory.pm
  • lib/RPC/XML/Procedure.pm
  • lib/RPC/XML/Server.pm
  • xt/02_pod_coverage.t

Made 5.8.8 the new minimum-required perl. Also dropped the utf8_downgrade hack, which affected an xt test.

  • lib/RPC/XML/Client.pm

Improved arguments-checking in send_request.

  • lib/RPC/XML/Client.pm
  • lib/RPC/XML/Parser/XMLLibXML.pm
  • lib/RPC/XML/Parser/XMLParser.pm
  • lib/RPC/XML/Server.pm

Fixed error-cases in usage of File::Temp->new(). File::Temp::new croaks on errors, doesn’t return undef like I thought.

  • MANIFEST
  • lib/RPC/XML/Function.pm (deleted)
  • lib/RPC/XML/Method.pm (deleted)
  • lib/RPC/XML/Procedure.pm

Roll Method.pm and Function.pm into Procedure.pm. Remove Method.pm and Function.pm from distro.

  • lib/RPC/XML/Parser/XMLLibXML.pm

Fixed regexp for methodName validation.

  • t/10_data.t
  • t/11_base64_fh.t
  • t/12_nil.t
  • t/15_serialize.t
  • t/20_xml_parser.t
  • t/21_xml_libxml.t
  • t/25_parser_negative.t (added)
  • t/29_parserfactory.t
  • t/30_method.t
  • t/40_server.t
  • t/40_server_xmllibxml.t
  • t/50_client.t
  • t/BadParserClass.pm (added)
  • t/meth_good_1.xpl
  • t/namespace3.xpl
  • t/svsm_text.b64 (added)
  • t/util.pl

First round of Devel::Cover-inspired improvements. These are the changes to the test suites to increase coverage of the code.

  • lib/RPC/XML.pm
  • lib/RPC/XML/Procedure.pm
  • lib/RPC/XML/Server.pm

Fixes and such from Devel::Cover analysis.

  • lib/RPC/XML/Procedure.pm
  • lib/RPC/XML/Server.pm
  • t/30_method.t
  • t/meth_good_1.xpl
  • t/meth_good_2.xpl (added)
  • t/meth_good_3.xpl (added)

Fixes for file-based method loading/reloading. New tests in the suite, and re-working of the ugliest hacky part of this package.

  • lib/RPC/XML/Procedure.pm
  • lib/RPC/XML/Server.pm
  • t/30_method.t
  • t/meth_good_3.xpl

RPC::XML::Procedure test-coverage improvement. Also removed some unneeded code.

  • lib/RPC/XML/Procedure.pm
  • lib/RPC/XML/Server.pm
  • t/30_method.t
  • t/40_server.t

Last round of RPC::XML::Procedure test coverage. This is mostly in t/40_server.t, though some bugs were found and addressed in the modules and in t/30_method.t.

  • lib/Apache/RPC/Server.pm
  • lib/Apache/RPC/Status.pm
  • lib/RPC/XML.pm
  • lib/RPC/XML/Client.pm
  • lib/RPC/XML/Parser.pm
  • lib/RPC/XML/Parser/XMLLibXML.pm
  • lib/RPC/XML/Parser/XMLParser.pm
  • lib/RPC/XML/ParserFactory.pm
  • lib/RPC/XML/Procedure.pm
  • lib/RPC/XML/Server.pm

Documentation clean-up and update.

  • lib/Apache/RPC/Server.pm
  • lib/Apache/RPC/Status.pm
  • lib/RPC/XML/Client.pm
  • lib/RPC/XML/Parser/XMLLibXML.pm
  • lib/RPC/XML/Parser/XMLParser.pm
  • lib/RPC/XML/Procedure.pm
  • lib/RPC/XML/Server.pm

Changes from new Perl::Critic::Bangs policies.

  • xt/01_pod.t
  • xt/02_pod_coverage.t
  • xt/03_meta.t
  • xt/04_minimumversion.t
  • xt/05_critic.t

Adjustments to reflect moving from t to xt. Also made changes to xt/02_pod_coverage.t to reflect changes to modules.

  • lib/RPC/XML/Client.pm

Removed some error checks that can never fail.

  • lib/RPC/XML/Server.pm
  • t/40_server.t

Code-coverage-driven changes and added tests.

  • etc/make_method

Fixes from new Perl::Critic::Bangs policies.

  • lib/RPC/XML/Server.pm

Removed usage of AutoLoader completely.

  • lib/RPC/XML/Server.pm
  • t/40_server.t
  • xt/02_pod_coverage.t

Removed some dead code and better did the aliases. This required a change in t/40_server.t for a private sub that no longer exists. Also updated xt/02_pod_coverage.t for private subs that have no pod.

  • lib/Apache/RPC/Server.pm

RT #67694: Fix a potential infinite-loop condition.

Tags: , , ,

Perl Module Release: Env-Export 0.22

July 7th, 2011 | 2 Comments | Posted in CPAN, Perl, Software
Version: 0.22

Released: Thursday July 7, 2011, 01:00:00 AM -0700

Changes:

  • t/00_load.t (deleted)
  • t/01_pod.t (deleted)
  • t/02_pod_coverage.t (deleted)
  • xt/00_load.t
  • xt/01_pod.t
  • xt/02_pod_coverage.t

Move author-only tests to the xt/ directory.

  • t/20_regex.t
  • t/25_glob.t
  • t/40_all.t

Consider volume when creating path to sub_count.pl.

  • t/10_basic.t
  • t/80_split.t

Additions to increase code-coverage of tests.

  • lib/Env/Export.pm

Bug fixes, critic clean-up and some docs clean-up. Some fixes related to getting better code-coverage in test suites.

  • lib/Env/Export.pm

Removed a left-over debugging line, doc fixes.

Tags: , , ,