Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Error Reporting from Module

by rjt (Curate)
on Oct 09, 2019 at 09:59 UTC ( #11107233=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
      my %params;
      if ( $params{content} ) { $request{content} = $params{content} }
    ...
      if ( $params{username} )   { $request{username}   = $params{username
    +} }
      if ( $params{avatar_url} ) { $request{avatar_url} = $params{avatar_u
    +rl} }
      if ( $params{tts} )        { $request{tts}        = JSON::PP::true }
    
  2. or download this
    my @valid_keys = qw< content username avatar_url >;
    
    my %request = map { $_ => $params{$_} } grep { $params{$_} } @valid_ke
    +ys;
    $request{tts} = $params{tts} ? JSON::PP::true : JSON::PP::false;
    
  3. or download this
    use String::Random;
    
    my $boundary = String::Random->new->randregex('[A-Za-z0-9]{32}');
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://11107233]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (6)
As of 2021-02-25 16:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?