Revision history for Perl extension Schedule::Depend
(most recent first).

0.20 Mon Apr 29 13:24:20 CDT 2002

 -	Remove depdency on Text::Balanced until I can make
 	the logic work; regexen work nicely for now.

 -	Removed option for null alias ("foo ="), leaving 
 	PHONY as a placeholder. This leaves the schedules
	a bit more obvious and less prone to dropout errors.

 -	POD and comment updates. POD is still behind development
 	but less so.

 -	Basic interface for prepare/execute seems stable. A few 
 	more methods may be broken out but the top-level calls
	should remian stable.

 -	test.pl needs to be updated with more complete tests for
 	handling of perl blocks, restart and noabort.

 -	Added a generic README.

0.19 Sat Apr 20 22:27:38 CDT 2002

 -	At this point the main interface isn't likely to change.

 -	Clean up unalias a bit, pushed lexicals into the
	if-ladder.

 -	Added croak ... unless $que at top of execute. Catches
 	accidental re-runs quicker.

 -	Code allows unalias to be called as a class method.
 	Main use of this is more automatic handling of the 
	if-ladder for cases where a preliminary job has to 
	be run outside of the schedule.

 - 	Added eval to require the package for A::B-type
 	aliases. This guarantees that $packag->can( $subroutine )
	succeeds even if S::D doesn't already have the
	package available.

 - 	Package::Subroutine alias handling includes an 
 	eval to require the sub in case it hasn't already 
	been pulled in where unalias can see it.

 -	unalias always returns a code referent. handling of
 	system calls is pushed into S::D->shellexec. This
	allows better logging of return values, since they
	actually mean something speicific. Also allows 
	overloaded method to run better sanity checks
	before dispatching to the shell if the environment
	is better controlled.

 -	Slightly better testing in test.pl to account for
 	some of the more offball alias formats.

0.18 Fri Apr 20 2002

 -	Comments, POD.

0.17 Pretend this never happend...

0.16 Wed Apr 17 20:54:30 CDT 2002

 -	Updated &precheck to use the last line of a 
 	pidfile if has >= 3 lines and perform a 
	numeric comparison to 0 for the exit status.
	This allows for the child + parent both 
	writing the status and sub's returning strings
	for successful execution.

 -	Put back the code that has the child writing
 	the returned scalar to the pidfile unmodified.
	This will store any return strings from called
	sub's. Parent gets back $result + 0 and writes
	the numeric pic to the file. Either way, the
	next pass with precheck can use "$linz[-1] = 0"
	to determine if the job completed successfully.

 -	Removed Text::Balanced until I can find out 
 	why it returns a block for "/foo/bar". Using
	regex /^({.+})$/ to extract any blocks.
 	

0.15 Tue Apr 16 12:13:59 CDT 2002

 -	Add the use of Text::Balanced::extract_codeblock
 	to handle anon sub's in the aliases. This allows
	a schedule to contain valid perl blocks that will
	be compiled and executed at runtime. 

	For example:

		foo = { do_this($dir) || do_that($dir) or croak "$$: Neither that nor this!" }

		...

		foo : bar 

	Will call the do_this or do_that sub's with the 
	value of $dir expanded in the parent process at
	runtime. 
	
	Note that the code must be on a single line.

	Since unalias() is called in the parent this can
	have side effects on subsequent children (e.g., 
	foo = {do_this(pop @dirlist)}). 


0.12 Fri Apr 12 14:05:41 CDT 2002

 -	Added handling for sub's named with packages for
 	the calls. e.g., "Foo::Bar::bletch : frobnicate"
	will call the subroutine in that package if it 
	exists. This requirs some change in the parser
	since it now has to detect colons that aren't 
	followed by colons to perform the split (not 
	difficult).

	At this point unalias can automatically detect
	methods, local subs and subs w/ package names
	before dispatching to the shell.

	Order of lookups is also changed, from Package::Sub
	through method to sub.

 -	Replaced assignment for $run with test for ref $que
 	and defined $que->{alias}{$job}. This allows false 
	values for placeholders and avoids problems if unalias
	is called as a class method.


0.11 Fri Apr 12 03:46:48 CDT 2002

 - 	Stamped out some doc bugs. Mainly that the 
 	required argument is "sched" not "depend",
	empty aliases are no longer errors and 
	bogus pod.

0.10 Thu Apr 11 14:16:40 CDT 2002

 -	Update unlias to search for $que->can( $run ) or 
	__PACKAGE__->can($run)', using closures to call
	the method/sub with the aliased string as an
	argument. This allows scheduling of methods or
	subs by name without any modification to the 
	S::D code.

	The mechanism for finding sub's is to unalis the
	jobname first, look for the ->can or CODE ref
	and pass it the original jobname if it's found.

	Thus:


		abc : foo
		xyz : foo
		bar : foo

		bar : abc xyz

	to call foo('abc'), foo('xyz') and foo('bar').
	This might be useful for, say, cleaning up multiple
	directories. To pass more informaiton just use 
	the arguments as hash keys into a package/global
	value with the extra info.

 -	Assigning an empty or 'PHONY' alias is a noop.
 	Thus:

		foo =

	or 

		foo = PHONY

	Will insert an immediate return of zero job into
	the schedule. This is mainly to neaten things up:

		foo =
		
		foo : long_named_job_one
		foo : even_longer_named_job_two
		foo : something_you_surely_do_not_want_to_type

		bar : foo

	now bar depends on all of the other three jobs without
	the line-from-hell in the middle of a schedule. This can
	also be handy for generating schedules on the fly, where
	bar is a placeholder and the others are pushed onto a 
	stack if they are needed.

 -	Doc updates.


0.09

	Put the tarball into a tarball rahter than 
	cpio archive, no change to the code.

0.08 Fri Apr  5 10:10:08 CST 2002

 -	Added runjob to handle the result of unalias
	after the fork. If the unaliased scalar is a
	code reference then it exits with the result
	of &$job; otherwise exec's $job. 

	Using an unalias with:

		no strict 'refs';
		\&$job

	to expand the tag from the scheule allows 
	queueing subroutines -- or a mixture of
	subroutines and shell execs. This could also
	return a closure to push evaluation parameters
	even later into the cycle (or for testing).

	See notes for unalias & runjob for examples.

 -	Added switch for handling failed jobs without
	aborting the queue. This offers the same effect
	as "make -k". If "noabort => true" is passed
	into prepare then jobs that fail will have their
	dependencies marked for skipping and the pidfiles
	will get a nastygram + exit status of -1 (i.e.,
	they will be re-executed on a restart). 

	The noabort code doesn't seem to break anything,
	but has not been fully tested (yet).

 -	pidfile and output directories can be passed in with the arguments,
	picked up from the environment or default to the current
	executable's directory name. the environment method can be
	handy for the single-argument version.

 -	Serious updates to pod and comments.


0.07

	Default for $que->{alias}{logdir} and {rundir}
	are "dirname $0". Simplifies running multpile
	copies of the same file and schedule from 
	different directories via soft link.

	Revised exit status writing. The child uses
	system instead of exec and writes $? to its
	own pidfile; the parent writes $? to the pidfile
	if it is non-zero. This allows either the parent
	or child to get zapped by a signal, leave the
	other running and correctly record the status.
	It also means that the pidfiles may be 4 lines
	long on failure. Fix there is to read [0..2]
	to check the status on the way in for restarts.

	Updated comments to reflect reality a bit better.

0.06

	Remove some of the extra newlines -- they aren't
	required since individual job output goes to 
	stdout/stderr files.

	Shuffled verobse prints to a bit to give saner
	combinatins of output. At this point test.log 
	should give a reasonable idea of what slient,
	progress and detailed output look like.

	Process verbose as an alias for setting verbosity.

	Add sanity check for odd number of arg's > 1
	in prepare. Makes it harder to zap thyself by
	adding "verbose => X" after a single-value
	schedule entry.

	test.pl checks for forkatotis in the module by 
	comparing the initial pid running test.pl with
	what's running after the test_blah call; croaks
	if the pid has changed since test.pl startup.

	Updated comments, pod to reflect the changes 
	since 0.03.

	Note: Still need to come up with a reasonable
	definition for processing the debug alias/arg
	during prepare and execution. It may require
	debug levels like: 1 => don't fork, 2 => also
	don't check or write pidfiles. Problem there
	is making sure that mixing $que->debug with 
	$que->prepare( ... debug => X ) doesn't cause
	unnecessary errors.

0.05:

	Output of individual jobs goes to $logdir/$job.out
	and $logdir/$job.err. Main purpose is to keep the
	top-level schedule logs clean.

	test.pl puts stdout to test.log -- saves a lotta 
	stuff flying by on make test.

	verbose and debug arg's to prepare and execute
	are independent (i.e, you can now debug in silent
	mode and get minimal output).

0.04 Fri Mar  1 13:52:34 CST 2002

	debug uses copy of queue, doesn't consume original
	object during debug, returns original object if 
	debug is successful. see comments for use.

	updated verbose handling, now has three levels: 0, 1, 2.
	0 == stop/start messages and nastygrams, 1 == progress
	messages from fork/reap; 2 == fairly detailed.  $q->{verbose}
	overrides the debug switch; no verbose setting w/ debug
	gives verbose == 2. added description of changes to POD.

	all verbose-controlled output goes to STDOUT, nastygrams
	and que start/complete messages to STDERR.

	doc updates to reflect changes in verbosity.

0.03 Wed Feb 27 12:20:18 CST 2002
	Doc updates.
	test.pl updated.

0.02  Wed Feb  6 17:25:02 CST 2002
	Release-able version.

0.01  Wed Feb  6 10:20:32 2002
	Beta