Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Why is my Catalyst application creating a 'detach' file at the root level?

by LittleJack (Beadle)
on Jul 22, 2021 at 01:06 UTC ( [id://11135279]=perlquestion: print w/replies, xml ) Need Help??

LittleJack has asked for the wisdom of the Perl Monks concerning the following question:

While grepping through the code of a Catalyst app for c->detach() calls, I found that there was a file, simply called 'detach' at the top level.

It contains log-file type entries, giving a module name and a line number plus an excerpt, and some of the lines relate to a call to the detach() method, but not all.

I've tried googling and searching through CPAN for any hint about this file, but come up blank.

TIA for any explanations monks may have. Is it a problem?

Replies are listed 'Best First'.
Re: Why is my Catalyst application creating a 'detach' file at the root level?
by roboticus (Chancellor) on Jul 22, 2021 at 13:37 UTC

    LittleJack:

    The ">" symbol tells the shell to pipe the output of the executed command (the stuff to the left) to the file named on the right.

    $ ls _README_MCM_ count_interrupts.cpp waitable_timer.cpp change_interval.cpp measure_interval.cpp $ grep c->detach *.cpp $ ls _README_MCM_ count_interrupts.cpp measure_interval.cpp change_interval.cpp detach waitable_timer.cpp

    So in this case, you'll want to either quote the string you're searching for, or escape any special symbol that the shell will treat differently.

    The bit that surprised me is that you can put the filenames to search for on the right side of the '>' symbol, I was expecting a warning or something, but as you can see above, it worked just fine and I got the 'detach' file in the directory as you indicated.

    ...roboticus

    When your only tool is a hammer, all problems look like your thumb.

      How embarrassing! Thank you for explaining that. Quoting the shell special character would have solved the problem, you're right. And the behaviour is a little strange as you say.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (5)
As of 2024-04-23 12:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found