I was going through replies and I noticed there were some unanswered questions:
took:1180 wallclock secs (23.34 usr + 1.36 sys = 24.70 CPU) Q3: What do the usr and sys numbers mean?
"User time" is the amount of time spent in user-mode code (your code plus any libraries it's using), and "system time" is the amount of time spent in the kernel, such as system calls.
Q4: Am I supposed to not have such collisions using version numbers or clever use of git? The features of the package change quickly, and sometimes, I have to roll back to something that actually worked.
This depends very much on how you plan on using and releasing this module. If this is something you're going to release on CPAN, then it's definitely important to put some thought into naming and versioning. For example, it'd be best to work beneath a single namespace (just for example Lingua::Translate::*), and especially not to pollute the top level with multiple namespaces such as Translate1:: and Translate2:: - instead, it'd be best to use a naming scheme such as Translate::MyEngine::V1 and Translate::MyEngine::V2.
On the other hand, if this something for your personal use, then you are free to do whatever you like and what is practical for you - you can do version control with Git, or, if you think that you'll be using multiple versions in parallel, naming like Translate1 and Translate2 (or maybe better: Translate::V1 and Translate::V2) would probably work too. Of course, it's also possible to switch between these two development modes - I've done rapid prototyping in a repository that ended up being quite littered with experiments etc., and then when it came time to release, I set up a new, clean repository into which I just put the files that should be released, added proper versioning, better naming, etc.
“Are you mad, my friend?” said he. ... Q5: How do I change my script so that these characters are rendered correctly?
That's definitely an encoding problem, but you'd have to show us a Short, Self-Contained, Correct Example that reproduces the issue. I showed an example of what information to provide in the case of encoding issues here.
Q6: How would I determine which version of WWW::Google::Translate to require?
That depends on what features of the module you're using, or whether older versions had bugs that your code is having problems with. For example, the changelog shows that the format parameter was added in 0.06, headers in 0.08, and model in 0.10. Another thing to look for might be whether newer versions changed the dependencies. Usually, I'll require the lowest possible version of a module, unless there have been egregious bugs in older versions, in which case I'll require the version after those bugs were fixed.
In reply to Re^3: chunking up texts correctly for online translation
by haukex
in thread chunking up texts correctly for online translation
by Aldebaran
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |