Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^3: Detecting if a folder is a symbolic link

by borodache (Novice)
on Apr 01, 2018 at 07:29 UTC ( [id://1212096]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Detecting if a folder is a symbolic link
in thread Detecting if a folder is a symbolic link

Hi,
I am doing this script in my workplace, and we are not allowed to add any external (cpan) library. Is there another solution?

Replies are listed 'Best First'.
Re^4: Detecting if a folder is a symbolic link
by hippo (Bishop) on Apr 01, 2018 at 15:18 UTC

    Of course. Simply look at how Win32::LongPath does it and do it the same way in your own script. This kind of lift-and-drop coding is a great waste of time compared to simply installing the module but since your employer makes the rules they will surely be happy to pay for your time.

    Other alternatives include:

    • Don't use Windows
    • Change employer
    • Tap your employer gently on the head with a copy of The Mythical Man-Month until they realise that CPAN is one of Perl's greatest strengths and not something to be shunned out of fear or suspicion
Re^4: Detecting if a folder is a symbolic link
by dasgar (Priest) on Apr 03, 2018 at 05:09 UTC
    I am doing this script in my workplace, and we are not allowed to add any external (cpan) library. Is there another solution?

    Sure. Your employer could hire someone to develop a program to do what you're trying to do and to provide support for that program. I think using CPAN would be a bit cheaper.

    You could try to find a utility that can examine a file to determine if it is a link or not and call that from your Perl code. If its not freeware, then there will be a fee involved. If it is freeware, then I'm not seeing much difference between using that and using CPAN.

    You could try to use a different scripting/programming language. In addition to any financial costs related to purchasing needed software (such as a compiler), there's the cost of time spent porting your Perl code to another language and possibly time lost for having to learn a new language. Using CPAN seems to be a faster and cheaper option in my mind.

    If internet access is the issue, you could look into CPAN::Mini to put a CPAN mirror on a USB stick drive or network share that could be used. Or you could develop the code on a system with internet and CPAN access and then bundle your code into a stand alone executable. There are software packages that you can purchase that can help with that process. Or you can look at something like the pp utility from PAR::Packer or check out salva's Win32::Packer module.

    Are there alternatives to using CPAN? Yes. I've listed some alternatives above and I'm sure there other individuals who could list more alternatives. But the alternatives may or may not be worth it for you and/or your employer.

    If you've invested time to develop Perl code for what you're doing and you're asking for help on a Perl site, why not utilize the full capabilities of the language (such as CPAN)?

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1212096]
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: (4)
As of 2024-03-29 06:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found