Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

The Monastery Gates

( #131=superdoc: print w/replies, xml ) Need Help??

If you're new here please read PerlMonks FAQ
and Create a new user.

Quests
poll ideas quest 2020
Starts at: Jan 01, 2020 at 00:00
Ends at: Dec 31, 2020 at 23:59
Current Status: Active
12 replies by pollsters
    First, read How do I create a Poll?. Then suggest your poll here. Complete ideas are more likely to be used.

    Note that links may be used in choices but not in the title.

Perl News
Tau Station Perl MMORPG Kickstarter Launched
on Oct 05, 2020 at 13:21
3 replies by Ovid

    There's a song by Shaggy, "It wasn't me", that is running through my head. If you're familiar with it, it's somehow both catchy and vile. I've had ex partners describe me that way.

    The song is running through my head because I'm not the one who accidentally launched the Tau Station Kickstarter several days early. But it's done.

    And they won't let us restart it.

    So maybe it's not our intended launch window. Maybe we weren't ready. But we're owning this. We're making this happen.

    Please help support the world's first Biblio-RPG. It's a massive, immersive, narrative sci-fi MMO. And it's over 400,000 lines of Perl. Let's show the world what Perl can do.

    Even if you don't want to join in, please share this with everyone!

    Here's the link to the Kickstarter.

    And here's a link to the game. It's free to play and runs in any relatively modern browser, so you won't need to download anything or spend any money.

perldoc.perl.org usable again
on Oct 01, 2020 at 05:12
2 replies by hippo
Supplications
Good REST API Tutorial for Perl.
1 direct reply — Read more / Contribute
by netizen
on Oct 29, 2020 at 16:36

    Exalted Monks,

    I was here last time asking about Perl and was both humbled and amazed by your answers. I am here again to ask you for another favour. I am looking for a good tutorial for REST API for Perl.

    What I understand as of now, is that REST API is something like a call I make to a website and give me the results in the json format, that's all.

    If you could direct me to a good tutorial that teaches REST API using Perl, I will be ever so thankful.

Perl DBI connect cached still active
1 direct reply — Read more / Contribute
by newperldeveloper
on Oct 28, 2020 at 20:43
    I am doing a perl query using
    my $prod_dbh = DBI->connect_cached('DBI:Sybase:database','web_','web') + || die "Couldn't connect to DB!\n" . DBI->errstr; my $parent_sth = $prod_dbh->prepare_cached('select * from table where +id = ?'); $parent_sth->bind_param(1,$id); $parent_sth->execute(); my @parent_data = $parent_sth->fetchrow_array();
    If I try to do another query it fails and give an error
    my $child_sth = $prod_dbh->prepare_cached('select * from table2 where +id = ?'); $child_sth->bind_param(1,$parent_data[0]); $child_sth->execute(); my @child_data = $child_sth->fetchrow_array(); print Dumper(@child_data);
    Fails with statement handle DBI::st=HASH(0x1ed1280) still Active at When I add the line $parent_sth->finish(); to the first block of code. I get no data from the @child_data If I just grab the query and run it data is returned so I know the result should contain data but nothing is being returned when I dump child_data. I know it is executing the code when I print after the dumper I get my printed content. I was reading I need to
Can't write values from sorted array of structs
2 direct replies — Read more / Contribute
by maschwarz
on Oct 28, 2020 at 12:51
how can I access podwebserver remotely?
3 direct replies — Read more / Contribute
by misterperl
on Oct 28, 2020 at 11:41
    I installed and started podwebserver as root. Oddly, the install did not put the executable into /usr/bin even though the install said OK. locate didn't find it anywhere!

    So I copied that from another node, placed it into /usr/bin, and chmod-ed it. Now it runs. It indexes modules, then tells me I can access the pod using localhost:8020 . Ducky!

    But that host is in another state- its NOT my localhost. So I figure no problem, I'll just use:

    http://www.myserver.com:8020
    But that times out.. Is this ONLY viewable as localhost?

    TYVM

Listing scripts in distribution metadata
1 direct reply — Read more / Contribute
by perlancar
on Oct 27, 2020 at 18:43
    I wonder why the CPAN distribution metadata does not define a more general 'provides' to let a distribution specifies the list of scripts or other documents that it contains, in addition to packages. It would make things easier for tools like MetaCPAN, or App::lcpan. Right now I believe (not confirmed yet by reading the source code) that MetaCPAN performs some static parsing of Makefile.PL to get EXE_FILES, but less-than-straightforward declaration of EXE_FILES will make it miss (example: Spreadsheet-Read's Makefile.PL).
a perldbg question about breaks
4 direct replies — Read more / Contribute
by misterperl
on Oct 27, 2020 at 12:11
    I know I can set
    dbg> b myclass::mymethod
    anywhere. Which is very useful. And I can set
    dbg> b 123
    to break at line 123 in my current scope. But, can I set a break at a line in another class, like
    dbg> b myclass::123
    (I know THAT doesn't work) but is there a syntax to do that? TY
Perl Zlib last block
1 direct reply — Read more / Contribute
by Kroning
on Oct 26, 2020 at 07:36

    Hi!

    I have some packet from app that looks like "ec bd ... 00 00 ff ff" which I am trying to decode.

    From what I have found, it looks like "00 00 ff ff" is a Z_SYNC_FLUSH of deflate (zlib).

    I tried to reproduce it on Compress::Raw::Zlib, Compress::Zlib and some others. But the ending pattern was "00 ff 00 ff". Am I missing something?

    #!/usr/local/bin/perl use Compress::Zlib ; my $x = deflateInit() or die "Cannot create a deflation stream\n" ; ($output, $status) = $x->deflate('text') ; ($output, $status) = $x->flush(Z_SYNC_FLUSH) ; $output =~ s/(.)/sprintf '%04x', ord $1/seg; print "output=$output\n";
    output=002a004900ad0028000100000000000000ff00ff00000000000000ff00ff
Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (6)
As of 2020-10-31 19:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My favourite web site is:












    Results (291 votes). Check out past polls.

    Notices?