Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: .dancer -- what's it for

by 1nickt (Canon)
on Jan 22, 2021 at 23:00 UTC ( [id://11127316]=note: print w/replies, xml ) Need Help??


in reply to .dancer -- what's it for

Hi Ken, FWIW I never heard of this until today and I've been using Dancer and Dancer2 for some years. I always build up my app directories from scratch though, not using the supplied script. I'm rather sure you can ignore it or cease using it altogether.

Hope this helps!


The way forward always starts with a minimal test.

Replies are listed 'Best First'.
Re^2: .dancer -- what's it for
by kcott (Archbishop) on Jan 24, 2021 at 08:29 UTC

    G'day 1nickt,

    I've had some minimal exposure to Dancer but don't recall ever seeing .dancer associated with that.

    I've just started a new $work project that uses Dancer2. That required a fair bit of reading and this is where .dancer kept appearing.

    I'm also not using the supplied script; but I have been looking at its documented output as a reference source. Some files I'll need with some modifications; some I won't want at all; and then there was .dancer with a huge question mark hanging over it.

    — Ken

      The only thing I can speculate is that it's a marker for the base directory -- but that would be odd since there's a method for that. On the other hand, I do usually always have such a dot-file marking the root of my app installation on the FS, so that scripts know where to look for library paths, and so on. Most of my scripts start with something like:

      BEGIN { use Path::Tiny; my $base = path(__FILE__)->parent; $base = $base->parent until -f "$base/.some-dot-file" or $base->is +_rootdir; unshift @INC, "$base/lib"; }
      ... so that they don't have to know where they live. Possibly .dancer has or once had a purpose like that?


      The way forward always starts with a minimal test.

        That's interesting speculation; however, all the code that I've seen, in various parts of the documentation, has:

        use FindBin; use lib "$FindBin::Bin/../lib";

        Yes, it could be legacy code: https://github.com/PerlDancer/Dancer2/tree/master/share/skel indicates .dancer was added five years ago.

        If I come across any other information, I'll post it. Thanks for your attempts to help with this.

        — Ken

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (4)
As of 2024-04-24 19:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found