Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Starting a New Script

by LloydRice (Beadle)
on Sep 17, 2016 at 02:56 UTC ( [id://1171986]=note: print w/replies, xml ) Need Help??


in reply to Starting a New Script

Many thanks for the replies to my post. The first reply asked for some notes on what bits and pieces could be set up to start new code. I have included the command-line usage message printout. (USPTO is a contract I am working on.) And yes, it is strictly command-line, not a workspace as many assumed.

I have heard of github, but have not looked into it. I will do that.

MST 19:49:59.87 C:\temp:newpl Create a skeleton Perl script in the current directory. Usage: newpl [basename] ( optional function list ) ... If one or more function names are specified, the named function(s) will be copied, first by section then lowest priority first, from the master function scripts. Available functions are defined in \c\perl\function. Currently available master functions (p#=priority) include: p0: getargs test argument count and show usage message getopts parse command line arguments for -xx strings p1: envvar Expand an evironment variable in the form {VAR} uspto Extract 'uspto'-related user variable definitions uspto2 A new hash-based implementation of uspto uservars Create user variable hash %uservars log10 Return the base 10 logarithm of a number curdir Get the current working directory name p2: pi use the arctan function for useful multiples of pi time Various routines for dealing with date/time usetime More time demos and applications defext Add a default extension to a given path/file name defext2 Like defext, but includes the forceext function fread Open a file for reading fwrite Open a file for writing readdir Open a directory for reading readsrf Read an SRF file, saving field values in a 2D array psstuff The full Postscript pkg (for direct PS printing) ps_usefmt Include the Postscript pkg (using (pagefmt) run) pause Pause and continue or exit p3: strpack Convert between char strings and index lists cmdline A simple console-interactive command loop
Lloyd

Replies are listed 'Best First'.
Re^2: Starting a New Script
by Mr. Muskrat (Canon) on Sep 20, 2016 at 21:25 UTC

    Without seeing more of the code it is hard to get a good answer. Based solely on the usage information, it sounds like you should consider moving the functions into modules or using existing modules from CPAN (because most if not all of that functionality is already available). Then you could either ditch the script or modify it so that it creates a script that uses the appropriate modules and only imports the functions requested.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (2)
As of 2024-04-26 01:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found