I am in need of a library for perl that will let me download files from torrents and magnet links in a simple way. Does anyone have any suggestions? Thanks!
Several such libraries include:
Net::BitTorrent or here , with documentation here
Protocol::BitTorrent
Several existing Perl BitTorent clients include:
Bitflu
AnyEvent::BitTorrent
Basic Net::BitTorrent Client
Also see this related question.
Related
I'm looking to write a script that lets a user upload an image from a webpage, for later use on that website. As per usual, all I can find is examples involving CGI.pm. Are there any core modules that I can use as a replacement?
The Perl core distribution contains no modules for writing web applications. I think you probably want something based on Plack::Request and Plack::Request::Upload (for example Dancer2::Core::Request::Upload).
The solution I ended up going with may not be the best, but it's functioning, and simple.
Using cgi-lib.pl I can simply use
open(VAR, ">output/file.png");
binmode VAR;
print VAR $in{input};
close(VAR);
and it gets the job done.
If there are any notable problems with this, please let me know.
I just installed AsteriskNow-6.12.65.14 and I want to try REST API. I've read a lot of tutorials, but I can't find ari.conf in the /etc/asterisk/ folder.
This is my first experience configuring Asterisk so I might just be missing something fundamental.
Asterisk 12
AsteriskNow-6.12.65.14
As far as i know asterisknow not offer experemental features like ARI.
You have create config files yourself if you need it.
I would like to generate documentation in a Dancer application in the same way that Mojolicious does with Mojolicious::Plugin::PODRenderer, I mean in the browser, under the /perldoc path.
Does somebody knows a module that can help? I found no ready-made plugin for Dancer. If it don't exist, any recommandation is welcome.
Porting Mojolicious' PODRenderer to Dancer should be fairly simple - it's an example plugin and the code is fairly short. I've done this for my own use in my CGI framework at work.
https://github.com/kraih/mojo/blob/master/lib/Mojolicious/Plugin/PODRenderer.pm#L34
Essentially what the plugin does is define the route /perldoc/:module to call the _perldoc method; the _perldoc method uses Pod::Simple::Search to find a documentation file matching the module param in the #INC directories; If it doesn't, it redirects the search to MetaCPAN. If it does, it uses Pod::Simple::HTML to convert the documentation to HTML, which is then tidied up with Mojo::DOM and wrapped in a lovely template.
Finding the location of that template is left as an exercise for... oh, nevermind, here it is: https://github.com/kraih/mojo/blob/master/lib/Mojolicious/templates/perldoc.html.ep
I have written a library in CoffeeScript.
It is made to tie Backbone views with Backbone collections and models through Knockout view-models. It helps to easily develope admin web-interfaces, and i've used it in my project. Now it is time to open-source this package, but i stuck with name. Current name - "bbko" comes from BackBone + KnockOut, but it does not sound good does it?
I am not a native English speaker, so your help is appreciated.
P.S. I know, there is already a good alternative library - KnockBack. It is not the one i wrote )))
Do you need some name suggestions? How about one of the following:
knock-my-bone
backbone-mvvm
knockdown
power-knock
outback
back-boxing
You can also go the Substuck way and give your package a completely different name, for example:
Loot
front-party
sandwich
luckyboy
boxing
clown-fish
Ultimately, it doesn't matter how you name your module. If it's good people will use it, star in on NPM and GitHub and recommend it to other developers.
I developed a application with Zend Framework and now I want to be able to place the app in an subdirectory of a Documentroot.
e.g. http://www.example.com/myapp/
I read quite a lot of Docu how this could work, but all in all these solutions don´t fit my needs. Is there a trivial way to do the subdir thing, without adding the concrete path to any file which generates the pages.
There are some examples in the net, where a basePath is set in the application enviroment and so there is a method call bevor each "form" creation which prepends the path before the link.
$form->setAction($this->_request->getBaseUrl() . $this->_helper->url('sign'));
This was from: http://johnmee.com/2008/11/zend-framework-quickstart-tutorial-deploy-to-a-subdirectory-instead-of-web-root/
But this is only works for small examples, I have tons of forms, tons of views and tons of scripts. I can´t belive this (lets call it hack :) ) is the only solution to do this.
Any ideas?
You don't have to do anything special. See my tutorial at http://akrabat.com/Zend-framework-tutorial which is developed entirely within a sub-directory.
As they say on the web page:
I’m told this last issue has been
lodged has a defect and not necessary
from releases “1.7″ and beyond. The
helper->url will henceforth prepend
the baseUrl to its result.
So you should be fine. Do you actually use the $form->setAction() method on every form already? Because if you use it in combination with the url helper, the baseUrl will already be included.