Hi, I have this code in my app.psgi file of my Dancer2 application and its loaded without any error. is that possible for you to let me know the reason its not printing the site_id

#!/usr/bin/env perl use strict; use warnings; use FindBin; use lib "$FindBin::Bin/../lib"; use webapp; use Net::OAuth2::Client; use Dancer2; sub client { Net::OAuth2::Client->new( config->{'xxxxxxxxxxxxxxxxxxx'}, config->{'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx +'}, authorize_url => 'https://dev.oktapreview.com/oauth2/ +v1/authorize', access_token_url => 'https://dev.oktapreview.com/oauth2/v1/token +', response_type => 'code', redirect_uri => uri_for ("https://testchandan.com:5001"), grant_type => 'authorization_code', scope => 'openid', state => '1234', ); } get '/:site_id' => sub { my $p = params; print $p->{id}; my $id = route_parameters->get('site_id'); print "My $id" . "\n"; redirect client(params->{site_id})->authorize; }; webapp->to_app;

In reply to Re^4: How can i capture the site_id in Dancer 2 app? by chandantul
in thread How can i capture the site_id in Dancer 2 app? by chandantul

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.