Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

added Stuff::Gnostic

  • Loading branch information...
commit cf6980820b40b482827d7d09005bc08a814fdf87 1 parent 672326d
@matthewg42 authored
Showing with 1,842 additions and 1 deletion.
  1. +1 −1  modules/mkdebs.sh
  2. +2 −0  modules/stuff_gnostic/Changes
  3. +165 −0 modules/stuff_gnostic/LICENSE
  4. +1 −0  modules/stuff_gnostic/MANIFEST.SKIP
  5. +788 −0 modules/stuff_gnostic/Makefile
  6. +8 −0 modules/stuff_gnostic/Makefile.PL
  7. 0  modules/stuff_gnostic/blib/arch/.exists
  8. 0  modules/stuff_gnostic/blib/arch/auto/Stuff/Gnostic/.exists
  9. 0  modules/stuff_gnostic/blib/bin/.exists
  10. 0  modules/stuff_gnostic/blib/lib/Stuff/.exists
  11. +180 −0 modules/stuff_gnostic/blib/lib/Stuff/Gnostic.pm
  12. 0  modules/stuff_gnostic/blib/lib/auto/Stuff/Gnostic/.exists
  13. 0  modules/stuff_gnostic/blib/man1/.exists
  14. 0  modules/stuff_gnostic/blib/man3/.exists
  15. +186 −0 modules/stuff_gnostic/blib/man3/Stuff::Gnostic.3pm
  16. 0  modules/stuff_gnostic/blib/script/.exists
  17. +5 −0 modules/stuff_gnostic/debian/changelog
  18. +1 −0  modules/stuff_gnostic/debian/compat
  19. +16 −0 modules/stuff_gnostic/debian/control
  20. +29 −0 modules/stuff_gnostic/debian/copyright
  21. +1 −0  modules/stuff_gnostic/debian/files
  22. +45 −0 modules/stuff_gnostic/debian/libstuff-gnostic-perl.debhelper.log
  23. +2 −0  modules/stuff_gnostic/debian/libstuff-gnostic-perl.substvars
  24. +13 −0 modules/stuff_gnostic/debian/libstuff-gnostic-perl/DEBIAN/control
  25. +4 −0 modules/stuff_gnostic/debian/libstuff-gnostic-perl/DEBIAN/md5sums
  26. BIN  modules/stuff_gnostic/debian/libstuff-gnostic-perl/usr/share/doc/libstuff-gnostic-perl/changelog.Debian.gz
  27. +29 −0 modules/stuff_gnostic/debian/libstuff-gnostic-perl/usr/share/doc/libstuff-gnostic-perl/copyright
  28. BIN  modules/stuff_gnostic/debian/libstuff-gnostic-perl/usr/share/man/man3/Stuff::Gnostic.3pm.gz
  29. +180 −0 modules/stuff_gnostic/debian/libstuff-gnostic-perl/usr/share/perl5/Stuff/Gnostic.pm
  30. +4 −0 modules/stuff_gnostic/debian/rules
  31. +2 −0  modules/stuff_gnostic/debian/watch
  32. +180 −0 modules/stuff_gnostic/lib/Stuff/Gnostic.pm
  33. 0  modules/stuff_gnostic/pm_to_blib
View
2  modules/mkdebs.sh
@@ -10,7 +10,7 @@ erex () {
if [ $# -gt 0 ]; then
modules="$@"
else
- modules="stuff_chart stuff_bytesize stuff_column stuff_debug stuff_expiryset stuff_mktemp stuff_morse stuff_parserange stuff_range stuff_relpath stuff_statset stuff_table stuff_text stuff_usage"
+ modules="stuff_chart stuff_bytesize stuff_column stuff_debug stuff_expiryset stuff_gnostic stuff_mktemp stuff_morse stuff_parserange stuff_range stuff_relpath stuff_statset stuff_table stuff_text stuff_usage"
fi
for p in $modules; do
View
2  modules/stuff_gnostic/Changes
@@ -0,0 +1,2 @@
+2011-03-28
+ Creation
View
165 modules/stuff_gnostic/LICENSE
@@ -0,0 +1,165 @@
+ GNU LESSER GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+
+ This version of the GNU Lesser General Public License incorporates
+the terms and conditions of version 3 of the GNU General Public
+License, supplemented by the additional permissions listed below.
+
+ 0. Additional Definitions.
+
+ As used herein, "this License" refers to version 3 of the GNU Lesser
+General Public License, and the "GNU GPL" refers to version 3 of the GNU
+General Public License.
+
+ "The Library" refers to a covered work governed by this License,
+other than an Application or a Combined Work as defined below.
+
+ An "Application" is any work that makes use of an interface provided
+by the Library, but which is not otherwise based on the Library.
+Defining a subclass of a class defined by the Library is deemed a mode
+of using an interface provided by the Library.
+
+ A "Combined Work" is a work produced by combining or linking an
+Application with the Library. The particular version of the Library
+with which the Combined Work was made is also called the "Linked
+Version".
+
+ The "Minimal Corresponding Source" for a Combined Work means the
+Corresponding Source for the Combined Work, excluding any source code
+for portions of the Combined Work that, considered in isolation, are
+based on the Application, and not on the Linked Version.
+
+ The "Corresponding Application Code" for a Combined Work means the
+object code and/or source code for the Application, including any data
+and utility programs needed for reproducing the Combined Work from the
+Application, but excluding the System Libraries of the Combined Work.
+
+ 1. Exception to Section 3 of the GNU GPL.
+
+ You may convey a covered work under sections 3 and 4 of this License
+without being bound by section 3 of the GNU GPL.
+
+ 2. Conveying Modified Versions.
+
+ If you modify a copy of the Library, and, in your modifications, a
+facility refers to a function or data to be supplied by an Application
+that uses the facility (other than as an argument passed when the
+facility is invoked), then you may convey a copy of the modified
+version:
+
+ a) under this License, provided that you make a good faith effort to
+ ensure that, in the event an Application does not supply the
+ function or data, the facility still operates, and performs
+ whatever part of its purpose remains meaningful, or
+
+ b) under the GNU GPL, with none of the additional permissions of
+ this License applicable to that copy.
+
+ 3. Object Code Incorporating Material from Library Header Files.
+
+ The object code form of an Application may incorporate material from
+a header file that is part of the Library. You may convey such object
+code under terms of your choice, provided that, if the incorporated
+material is not limited to numerical parameters, data structure
+layouts and accessors, or small macros, inline functions and templates
+(ten or fewer lines in length), you do both of the following:
+
+ a) Give prominent notice with each copy of the object code that the
+ Library is used in it and that the Library and its use are
+ covered by this License.
+
+ b) Accompany the object code with a copy of the GNU GPL and this license
+ document.
+
+ 4. Combined Works.
+
+ You may convey a Combined Work under terms of your choice that,
+taken together, effectively do not restrict modification of the
+portions of the Library contained in the Combined Work and reverse
+engineering for debugging such modifications, if you also do each of
+the following:
+
+ a) Give prominent notice with each copy of the Combined Work that
+ the Library is used in it and that the Library and its use are
+ covered by this License.
+
+ b) Accompany the Combined Work with a copy of the GNU GPL and this license
+ document.
+
+ c) For a Combined Work that displays copyright notices during
+ execution, include the copyright notice for the Library among
+ these notices, as well as a reference directing the user to the
+ copies of the GNU GPL and this license document.
+
+ d) Do one of the following:
+
+ 0) Convey the Minimal Corresponding Source under the terms of this
+ License, and the Corresponding Application Code in a form
+ suitable for, and under terms that permit, the user to
+ recombine or relink the Application with a modified version of
+ the Linked Version to produce a modified Combined Work, in the
+ manner specified by section 6 of the GNU GPL for conveying
+ Corresponding Source.
+
+ 1) Use a suitable shared library mechanism for linking with the
+ Library. A suitable mechanism is one that (a) uses at run time
+ a copy of the Library already present on the user's computer
+ system, and (b) will operate properly with a modified version
+ of the Library that is interface-compatible with the Linked
+ Version.
+
+ e) Provide Installation Information, but only if you would otherwise
+ be required to provide such information under section 6 of the
+ GNU GPL, and only to the extent that such information is
+ necessary to install and execute a modified version of the
+ Combined Work produced by recombining or relinking the
+ Application with a modified version of the Linked Version. (If
+ you use option 4d0, the Installation Information must accompany
+ the Minimal Corresponding Source and Corresponding Application
+ Code. If you use option 4d1, you must provide the Installation
+ Information in the manner specified by section 6 of the GNU GPL
+ for conveying Corresponding Source.)
+
+ 5. Combined Libraries.
+
+ You may place library facilities that are a work based on the
+Library side by side in a single library together with other library
+facilities that are not Applications and are not covered by this
+License, and convey such a combined library under terms of your
+choice, if you do both of the following:
+
+ a) Accompany the combined library with a copy of the same work based
+ on the Library, uncombined with any other library facilities,
+ conveyed under the terms of this License.
+
+ b) Give prominent notice with the combined library that part of it
+ is a work based on the Library, and explaining where to find the
+ accompanying uncombined form of the same work.
+
+ 6. Revised Versions of the GNU Lesser General Public License.
+
+ The Free Software Foundation may publish revised and/or new versions
+of the GNU Lesser General Public License from time to time. Such new
+versions will be similar in spirit to the present version, but may
+differ in detail to address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Library as you received it specifies that a certain numbered version
+of the GNU Lesser General Public License "or any later version"
+applies to it, you have the option of following the terms and
+conditions either of that published version or of any later version
+published by the Free Software Foundation. If the Library as you
+received it does not specify a version number of the GNU Lesser
+General Public License, you may choose any version of the GNU Lesser
+General Public License ever published by the Free Software Foundation.
+
+ If the Library as you received it specifies that a proxy can decide
+whether future versions of the GNU Lesser General Public License shall
+apply, that proxy's public statement of acceptance of any version is
+permanent authorization for you to choose that version for the
+Library.
View
1  modules/stuff_gnostic/MANIFEST.SKIP
@@ -0,0 +1 @@
+~$
View
788 modules/stuff_gnostic/Makefile
@@ -0,0 +1,788 @@
+# This Makefile is for the Stuff::Gnostic extension to perl.
+#
+# It was generated automatically by MakeMaker version
+# 6.55_02 (Revision: 65502) from the contents of
+# Makefile.PL. Don't edit this file, edit Makefile.PL instead.
+#
+# ANY CHANGES MADE HERE WILL BE LOST!
+#
+# MakeMaker ARGV: (q[INSTALLDIRS=vendor], q[create_packlist=0])
+#
+
+# MakeMaker Parameters:
+
+# AUTHOR => q[Matthew Gates <matthew@porpoisehead.net>]
+# BUILD_REQUIRES => { }
+# NAME => q[Stuff::Gnostic]
+# PREREQ_PM => { }
+# VERSION_FROM => q[lib/Stuff/Gnostic.pm]
+
+# --- MakeMaker post_initialize section:
+
+
+# --- MakeMaker const_config section:
+
+# These definitions are from config.sh (via /usr/lib/perl/5.10/Config.pm).
+# They may have been overridden via Makefile.PL or on the command line.
+AR = ar
+CC = cc
+CCCDLFLAGS = -fPIC
+CCDLFLAGS = -Wl,-E
+DLEXT = so
+DLSRC = dl_dlopen.xs
+EXE_EXT =
+FULL_AR = /usr/bin/ar
+LD = cc
+LDDLFLAGS = -shared -O2 -g -L/usr/local/lib -fstack-protector
+LDFLAGS = -fstack-protector -L/usr/local/lib
+LIBC = /lib/libc-2.12.so
+LIB_EXT = .a
+OBJ_EXT = .o
+OSNAME = linux
+OSVERS = 2.6.24-27-server
+RANLIB = :
+SITELIBEXP = /usr/local/share/perl/5.10.1
+SITEARCHEXP = /usr/local/lib/perl/5.10.1
+SO = so
+VENDORARCHEXP = /usr/lib/perl5
+VENDORLIBEXP = /usr/share/perl5
+
+
+# --- MakeMaker constants section:
+AR_STATIC_ARGS = cr
+DIRFILESEP = /
+DFSEP = $(DIRFILESEP)
+NAME = Stuff::Gnostic
+NAME_SYM = Stuff_Gnostic
+VERSION = 0.01
+VERSION_MACRO = VERSION
+VERSION_SYM = 0_01
+DEFINE_VERSION = -D$(VERSION_MACRO)=\"$(VERSION)\"
+XS_VERSION = 0.01
+XS_VERSION_MACRO = XS_VERSION
+XS_DEFINE_VERSION = -D$(XS_VERSION_MACRO)=\"$(XS_VERSION)\"
+INST_ARCHLIB = blib/arch
+INST_SCRIPT = blib/script
+INST_BIN = blib/bin
+INST_LIB = blib/lib
+INST_MAN1DIR = blib/man1
+INST_MAN3DIR = blib/man3
+MAN1EXT = 1p
+MAN3EXT = 3pm
+INSTALLDIRS = vendor
+DESTDIR =
+PREFIX = /usr
+PERLPREFIX = $(PREFIX)
+SITEPREFIX = $(PREFIX)/local
+VENDORPREFIX = $(PREFIX)
+INSTALLPRIVLIB = $(PERLPREFIX)/share/perl/5.10
+DESTINSTALLPRIVLIB = $(DESTDIR)$(INSTALLPRIVLIB)
+INSTALLSITELIB = $(SITEPREFIX)/share/perl/5.10.1
+DESTINSTALLSITELIB = $(DESTDIR)$(INSTALLSITELIB)
+INSTALLVENDORLIB = $(VENDORPREFIX)/share/perl5
+DESTINSTALLVENDORLIB = $(DESTDIR)$(INSTALLVENDORLIB)
+INSTALLARCHLIB = $(PERLPREFIX)/lib/perl/5.10
+DESTINSTALLARCHLIB = $(DESTDIR)$(INSTALLARCHLIB)
+INSTALLSITEARCH = $(SITEPREFIX)/lib/perl/5.10.1
+DESTINSTALLSITEARCH = $(DESTDIR)$(INSTALLSITEARCH)
+INSTALLVENDORARCH = $(VENDORPREFIX)/lib/perl5
+DESTINSTALLVENDORARCH = $(DESTDIR)$(INSTALLVENDORARCH)
+INSTALLBIN = $(PERLPREFIX)/bin
+DESTINSTALLBIN = $(DESTDIR)$(INSTALLBIN)
+INSTALLSITEBIN = $(SITEPREFIX)/bin
+DESTINSTALLSITEBIN = $(DESTDIR)$(INSTALLSITEBIN)
+INSTALLVENDORBIN = $(VENDORPREFIX)/bin
+DESTINSTALLVENDORBIN = $(DESTDIR)$(INSTALLVENDORBIN)
+INSTALLSCRIPT = $(PERLPREFIX)/bin
+DESTINSTALLSCRIPT = $(DESTDIR)$(INSTALLSCRIPT)
+INSTALLSITESCRIPT = $(SITEPREFIX)/bin
+DESTINSTALLSITESCRIPT = $(DESTDIR)$(INSTALLSITESCRIPT)
+INSTALLVENDORSCRIPT = $(VENDORPREFIX)/bin
+DESTINSTALLVENDORSCRIPT = $(DESTDIR)$(INSTALLVENDORSCRIPT)
+INSTALLMAN1DIR = $(PERLPREFIX)/share/man/man1
+DESTINSTALLMAN1DIR = $(DESTDIR)$(INSTALLMAN1DIR)
+INSTALLSITEMAN1DIR = $(SITEPREFIX)/man/man1
+DESTINSTALLSITEMAN1DIR = $(DESTDIR)$(INSTALLSITEMAN1DIR)
+INSTALLVENDORMAN1DIR = $(VENDORPREFIX)/share/man/man1
+DESTINSTALLVENDORMAN1DIR = $(DESTDIR)$(INSTALLVENDORMAN1DIR)
+INSTALLMAN3DIR = $(PERLPREFIX)/share/man/man3
+DESTINSTALLMAN3DIR = $(DESTDIR)$(INSTALLMAN3DIR)
+INSTALLSITEMAN3DIR = $(SITEPREFIX)/man/man3
+DESTINSTALLSITEMAN3DIR = $(DESTDIR)$(INSTALLSITEMAN3DIR)
+INSTALLVENDORMAN3DIR = $(VENDORPREFIX)/share/man/man3
+DESTINSTALLVENDORMAN3DIR = $(DESTDIR)$(INSTALLVENDORMAN3DIR)
+PERL_LIB = /usr/share/perl/5.10
+PERL_ARCHLIB = /usr/lib/perl/5.10
+LIBPERL_A = libperl.a
+FIRST_MAKEFILE = Makefile
+MAKEFILE_OLD = Makefile.old
+MAKE_APERL_FILE = Makefile.aperl
+PERLMAINCC = $(CC)
+PERL_INC = /usr/lib/perl/5.10/CORE
+PERL = /usr/bin/perl
+FULLPERL = /usr/bin/perl
+ABSPERL = $(PERL)
+PERLRUN = $(PERL)
+FULLPERLRUN = $(FULLPERL)
+ABSPERLRUN = $(ABSPERL)
+PERLRUNINST = $(PERLRUN) "-I$(INST_ARCHLIB)" "-I$(INST_LIB)"
+FULLPERLRUNINST = $(FULLPERLRUN) "-I$(INST_ARCHLIB)" "-I$(INST_LIB)"
+ABSPERLRUNINST = $(ABSPERLRUN) "-I$(INST_ARCHLIB)" "-I$(INST_LIB)"
+PERL_CORE = 0
+PERM_DIR = 755
+PERM_RW = 644
+PERM_RWX = 755
+
+MAKEMAKER = /usr/share/perl/5.10/ExtUtils/MakeMaker.pm
+MM_VERSION = 6.55_02
+MM_REVISION = 65502
+
+# FULLEXT = Pathname for extension directory (eg Foo/Bar/Oracle).
+# BASEEXT = Basename part of FULLEXT. May be just equal FULLEXT. (eg Oracle)
+# PARENT_NAME = NAME without BASEEXT and no trailing :: (eg Foo::Bar)
+# DLBASE = Basename part of dynamic library. May be just equal BASEEXT.
+MAKE = make
+FULLEXT = Stuff/Gnostic
+BASEEXT = Gnostic
+PARENT_NAME = Stuff
+DLBASE = $(BASEEXT)
+VERSION_FROM = lib/Stuff/Gnostic.pm
+OBJECT =
+LDFROM = $(OBJECT)
+LINKTYPE = dynamic
+BOOTDEP =
+
+# Handy lists of source code files:
+XS_FILES =
+C_FILES =
+O_FILES =
+H_FILES =
+MAN1PODS =
+MAN3PODS = lib/Stuff/Gnostic.pm
+
+# Where is the Config information that we are using/depend on
+CONFIGDEP = $(PERL_ARCHLIB)$(DFSEP)Config.pm $(PERL_INC)$(DFSEP)config.h
+
+# Where to build things
+INST_LIBDIR = $(INST_LIB)/Stuff
+INST_ARCHLIBDIR = $(INST_ARCHLIB)/Stuff
+
+INST_AUTODIR = $(INST_LIB)/auto/$(FULLEXT)
+INST_ARCHAUTODIR = $(INST_ARCHLIB)/auto/$(FULLEXT)
+
+INST_STATIC =
+INST_DYNAMIC =
+INST_BOOT =
+
+# Extra linker info
+EXPORT_LIST =
+PERL_ARCHIVE =
+PERL_ARCHIVE_AFTER =
+
+
+TO_INST_PM = lib/Stuff/Gnostic.pm
+
+PM_TO_BLIB = lib/Stuff/Gnostic.pm \
+ blib/lib/Stuff/Gnostic.pm
+
+
+# --- MakeMaker platform_constants section:
+MM_Unix_VERSION = 6.55_02
+PERL_MALLOC_DEF = -DPERL_EXTMALLOC_DEF -Dmalloc=Perl_malloc -Dfree=Perl_mfree -Drealloc=Perl_realloc -Dcalloc=Perl_calloc
+
+
+# --- MakeMaker tool_autosplit section:
+# Usage: $(AUTOSPLITFILE) FileToSplit AutoDirToSplitInto
+AUTOSPLITFILE = $(ABSPERLRUN) -e 'use AutoSplit; autosplit($$ARGV[0], $$ARGV[1], 0, 1, 1)' --
+
+
+
+# --- MakeMaker tool_xsubpp section:
+
+
+# --- MakeMaker tools_other section:
+SHELL = /bin/sh
+CHMOD = chmod
+CP = cp
+MV = mv
+NOOP = $(TRUE)
+NOECHO = @
+RM_F = rm -f
+RM_RF = rm -rf
+TEST_F = test -f
+TOUCH = touch
+UMASK_NULL = umask 0
+DEV_NULL = > /dev/null 2>&1
+MKPATH = $(ABSPERLRUN) -MExtUtils::Command -e 'mkpath' --
+EQUALIZE_TIMESTAMP = $(ABSPERLRUN) -MExtUtils::Command -e 'eqtime' --
+FALSE = false
+TRUE = true
+ECHO = echo
+ECHO_N = echo -n
+UNINST = 0
+VERBINST = 0
+MOD_INSTALL = $(ABSPERLRUN) -MExtUtils::Install -e 'install([ from_to => {@ARGV}, verbose => '\''$(VERBINST)'\'', uninstall_shadows => '\''$(UNINST)'\'', dir_mode => '\''$(PERM_DIR)'\'' ]);' --
+DOC_INSTALL = $(ABSPERLRUN) -MExtUtils::Command::MM -e 'perllocal_install' --
+UNINSTALL = $(ABSPERLRUN) -MExtUtils::Command::MM -e 'uninstall' --
+WARN_IF_OLD_PACKLIST = $(ABSPERLRUN) -MExtUtils::Command::MM -e 'warn_if_old_packlist' --
+MACROSTART =
+MACROEND =
+USEMAKEFILE = -f
+FIXIN = $(ABSPERLRUN) -MExtUtils::MY -e 'MY->fixin(shift)' --
+
+
+# --- MakeMaker makemakerdflt section:
+makemakerdflt : all
+ $(NOECHO) $(NOOP)
+
+
+# --- MakeMaker dist section:
+TAR = tar
+TARFLAGS = cvf
+ZIP = zip
+ZIPFLAGS = -r
+COMPRESS = gzip --best
+SUFFIX = .gz
+SHAR = shar
+PREOP = $(NOECHO) $(NOOP)
+POSTOP = $(NOECHO) $(NOOP)
+TO_UNIX = $(NOECHO) $(NOOP)
+CI = ci -u
+RCS_LABEL = rcs -Nv$(VERSION_SYM): -q
+DIST_CP = best
+DIST_DEFAULT = tardist
+DISTNAME = Stuff-Gnostic
+DISTVNAME = Stuff-Gnostic-0.01
+
+
+# --- MakeMaker macro section:
+
+
+# --- MakeMaker depend section:
+
+
+# --- MakeMaker cflags section:
+
+
+# --- MakeMaker const_loadlibs section:
+
+
+# --- MakeMaker const_cccmd section:
+
+
+# --- MakeMaker post_constants section:
+
+
+# --- MakeMaker pasthru section:
+
+PASTHRU = LIBPERL_A="$(LIBPERL_A)"\
+ LINKTYPE="$(LINKTYPE)"\
+ PREFIX="$(PREFIX)"
+
+
+# --- MakeMaker special_targets section:
+.SUFFIXES : .xs .c .C .cpp .i .s .cxx .cc $(OBJ_EXT)
+
+.PHONY: all config static dynamic test linkext manifest blibdirs clean realclean disttest distdir
+
+
+
+# --- MakeMaker c_o section:
+
+
+# --- MakeMaker xs_c section:
+
+
+# --- MakeMaker xs_o section:
+
+
+# --- MakeMaker top_targets section:
+all :: pure_all manifypods
+ $(NOECHO) $(NOOP)
+
+
+pure_all :: config pm_to_blib subdirs linkext
+ $(NOECHO) $(NOOP)
+
+subdirs :: $(MYEXTLIB)
+ $(NOECHO) $(NOOP)
+
+config :: $(FIRST_MAKEFILE) blibdirs
+ $(NOECHO) $(NOOP)
+
+help :
+ perldoc ExtUtils::MakeMaker
+
+
+# --- MakeMaker blibdirs section:
+blibdirs : $(INST_LIBDIR)$(DFSEP).exists $(INST_ARCHLIB)$(DFSEP).exists $(INST_AUTODIR)$(DFSEP).exists $(INST_ARCHAUTODIR)$(DFSEP).exists $(INST_BIN)$(DFSEP).exists $(INST_SCRIPT)$(DFSEP).exists $(INST_MAN1DIR)$(DFSEP).exists $(INST_MAN3DIR)$(DFSEP).exists
+ $(NOECHO) $(NOOP)
+
+# Backwards compat with 6.18 through 6.25
+blibdirs.ts : blibdirs
+ $(NOECHO) $(NOOP)
+
+$(INST_LIBDIR)$(DFSEP).exists :: Makefile.PL
+ $(NOECHO) $(MKPATH) $(INST_LIBDIR)
+ $(NOECHO) $(CHMOD) $(PERM_DIR) $(INST_LIBDIR)
+ $(NOECHO) $(TOUCH) $(INST_LIBDIR)$(DFSEP).exists
+
+$(INST_ARCHLIB)$(DFSEP).exists :: Makefile.PL
+ $(NOECHO) $(MKPATH) $(INST_ARCHLIB)
+ $(NOECHO) $(CHMOD) $(PERM_DIR) $(INST_ARCHLIB)
+ $(NOECHO) $(TOUCH) $(INST_ARCHLIB)$(DFSEP).exists
+
+$(INST_AUTODIR)$(DFSEP).exists :: Makefile.PL
+ $(NOECHO) $(MKPATH) $(INST_AUTODIR)
+ $(NOECHO) $(CHMOD) $(PERM_DIR) $(INST_AUTODIR)
+ $(NOECHO) $(TOUCH) $(INST_AUTODIR)$(DFSEP).exists
+
+$(INST_ARCHAUTODIR)$(DFSEP).exists :: Makefile.PL
+ $(NOECHO) $(MKPATH) $(INST_ARCHAUTODIR)
+ $(NOECHO) $(CHMOD) $(PERM_DIR) $(INST_ARCHAUTODIR)
+ $(NOECHO) $(TOUCH) $(INST_ARCHAUTODIR)$(DFSEP).exists
+
+$(INST_BIN)$(DFSEP).exists :: Makefile.PL
+ $(NOECHO) $(MKPATH) $(INST_BIN)
+ $(NOECHO) $(CHMOD) $(PERM_DIR) $(INST_BIN)
+ $(NOECHO) $(TOUCH) $(INST_BIN)$(DFSEP).exists
+
+$(INST_SCRIPT)$(DFSEP).exists :: Makefile.PL
+ $(NOECHO) $(MKPATH) $(INST_SCRIPT)
+ $(NOECHO) $(CHMOD) $(PERM_DIR) $(INST_SCRIPT)
+ $(NOECHO) $(TOUCH) $(INST_SCRIPT)$(DFSEP).exists
+
+$(INST_MAN1DIR)$(DFSEP).exists :: Makefile.PL
+ $(NOECHO) $(MKPATH) $(INST_MAN1DIR)
+ $(NOECHO) $(CHMOD) $(PERM_DIR) $(INST_MAN1DIR)
+ $(NOECHO) $(TOUCH) $(INST_MAN1DIR)$(DFSEP).exists
+
+$(INST_MAN3DIR)$(DFSEP).exists :: Makefile.PL
+ $(NOECHO) $(MKPATH) $(INST_MAN3DIR)
+ $(NOECHO) $(CHMOD) $(PERM_DIR) $(INST_MAN3DIR)
+ $(NOECHO) $(TOUCH) $(INST_MAN3DIR)$(DFSEP).exists
+
+
+
+# --- MakeMaker linkext section:
+
+linkext :: $(LINKTYPE)
+ $(NOECHO) $(NOOP)
+
+
+# --- MakeMaker dlsyms section:
+
+
+# --- MakeMaker dynamic section:
+
+dynamic :: $(FIRST_MAKEFILE) $(INST_DYNAMIC) $(INST_BOOT)
+ $(NOECHO) $(NOOP)
+
+
+# --- MakeMaker dynamic_bs section:
+
+BOOTSTRAP =
+
+
+# --- MakeMaker dynamic_lib section:
+
+
+# --- MakeMaker static section:
+
+## $(INST_PM) has been moved to the all: target.
+## It remains here for awhile to allow for old usage: "make static"
+static :: $(FIRST_MAKEFILE) $(INST_STATIC)
+ $(NOECHO) $(NOOP)
+
+
+# --- MakeMaker static_lib section:
+
+
+# --- MakeMaker manifypods section:
+
+POD2MAN_EXE = $(PERLRUN) "-MExtUtils::Command::MM" -e pod2man "--"
+POD2MAN = $(POD2MAN_EXE)
+
+
+manifypods : pure_all \
+ lib/Stuff/Gnostic.pm
+ $(NOECHO) $(POD2MAN) --section=$(MAN3EXT) --perm_rw=$(PERM_RW) \
+ lib/Stuff/Gnostic.pm $(INST_MAN3DIR)/Stuff::Gnostic.$(MAN3EXT)
+
+
+
+
+# --- MakeMaker processPL section:
+
+
+# --- MakeMaker installbin section:
+
+
+# --- MakeMaker subdirs section:
+
+# none
+
+# --- MakeMaker clean_subdirs section:
+clean_subdirs :
+ $(NOECHO) $(NOOP)
+
+
+# --- MakeMaker clean section:
+
+# Delete temporary files but do not touch installed files. We don't delete
+# the Makefile here so a later make realclean still has a makefile to use.
+
+clean :: clean_subdirs
+ - $(RM_F) \
+ *$(LIB_EXT) core \
+ core.[0-9] $(INST_ARCHAUTODIR)/extralibs.all \
+ core.[0-9][0-9] $(BASEEXT).bso \
+ pm_to_blib.ts core.[0-9][0-9][0-9][0-9] \
+ $(BASEEXT).x $(BOOTSTRAP) \
+ perl$(EXE_EXT) tmon.out \
+ *$(OBJ_EXT) pm_to_blib \
+ $(INST_ARCHAUTODIR)/extralibs.ld blibdirs.ts \
+ core.[0-9][0-9][0-9][0-9][0-9] *perl.core \
+ core.*perl.*.? $(MAKE_APERL_FILE) \
+ perl $(BASEEXT).def \
+ core.[0-9][0-9][0-9] mon.out \
+ lib$(BASEEXT).def perlmain.c \
+ perl.exe so_locations \
+ $(BASEEXT).exp
+ - $(RM_RF) \
+ blib
+ - $(MV) $(FIRST_MAKEFILE) $(MAKEFILE_OLD) $(DEV_NULL)
+
+
+# --- MakeMaker realclean_subdirs section:
+realclean_subdirs :
+ $(NOECHO) $(NOOP)
+
+
+# --- MakeMaker realclean section:
+# Delete temporary files (via clean) and also delete dist files
+realclean purge :: clean realclean_subdirs
+ - $(RM_F) \
+ $(MAKEFILE_OLD) $(FIRST_MAKEFILE)
+ - $(RM_RF) \
+ $(DISTVNAME)
+
+
+# --- MakeMaker metafile section:
+metafile : create_distdir
+ $(NOECHO) $(ECHO) Generating META.yml
+ $(NOECHO) $(ECHO) '--- #YAML:1.0' > META_new.yml
+ $(NOECHO) $(ECHO) 'name: Stuff-Gnostic' >> META_new.yml
+ $(NOECHO) $(ECHO) 'version: 0.01' >> META_new.yml
+ $(NOECHO) $(ECHO) 'abstract: ~' >> META_new.yml
+ $(NOECHO) $(ECHO) 'author:' >> META_new.yml
+ $(NOECHO) $(ECHO) ' - Matthew Gates <matthew@porpoisehead.net>' >> META_new.yml
+ $(NOECHO) $(ECHO) 'license: unknown' >> META_new.yml
+ $(NOECHO) $(ECHO) 'distribution_type: module' >> META_new.yml
+ $(NOECHO) $(ECHO) 'configure_requires:' >> META_new.yml
+ $(NOECHO) $(ECHO) ' ExtUtils::MakeMaker: 0' >> META_new.yml
+ $(NOECHO) $(ECHO) 'build_requires:' >> META_new.yml
+ $(NOECHO) $(ECHO) ' ExtUtils::MakeMaker: 0' >> META_new.yml
+ $(NOECHO) $(ECHO) 'requires: {}' >> META_new.yml
+ $(NOECHO) $(ECHO) 'no_index:' >> META_new.yml
+ $(NOECHO) $(ECHO) ' directory:' >> META_new.yml
+ $(NOECHO) $(ECHO) ' - t' >> META_new.yml
+ $(NOECHO) $(ECHO) ' - inc' >> META_new.yml
+ $(NOECHO) $(ECHO) 'generated_by: ExtUtils::MakeMaker version 6.55_02' >> META_new.yml
+ $(NOECHO) $(ECHO) 'meta-spec:' >> META_new.yml
+ $(NOECHO) $(ECHO) ' url: http://module-build.sourceforge.net/META-spec-v1.4.html' >> META_new.yml
+ $(NOECHO) $(ECHO) ' version: 1.4' >> META_new.yml
+ -$(NOECHO) $(MV) META_new.yml $(DISTVNAME)/META.yml
+
+
+# --- MakeMaker signature section:
+signature :
+ cpansign -s
+
+
+# --- MakeMaker dist_basics section:
+distclean :: realclean distcheck
+ $(NOECHO) $(NOOP)
+
+distcheck :
+ $(PERLRUN) "-MExtUtils::Manifest=fullcheck" -e fullcheck
+
+skipcheck :
+ $(PERLRUN) "-MExtUtils::Manifest=skipcheck" -e skipcheck
+
+manifest :
+ $(PERLRUN) "-MExtUtils::Manifest=mkmanifest" -e mkmanifest
+
+veryclean : realclean
+ $(RM_F) *~ */*~ *.orig */*.orig *.bak */*.bak *.old */*.old
+
+
+
+# --- MakeMaker dist_core section:
+
+dist : $(DIST_DEFAULT) $(FIRST_MAKEFILE)
+ $(NOECHO) $(ABSPERLRUN) -l -e 'print '\''Warning: Makefile possibly out of date with $(VERSION_FROM)'\''' \
+ -e ' if -e '\''$(VERSION_FROM)'\'' and -M '\''$(VERSION_FROM)'\'' < -M '\''$(FIRST_MAKEFILE)'\'';' --
+
+tardist : $(DISTVNAME).tar$(SUFFIX)
+ $(NOECHO) $(NOOP)
+
+uutardist : $(DISTVNAME).tar$(SUFFIX)
+ uuencode $(DISTVNAME).tar$(SUFFIX) $(DISTVNAME).tar$(SUFFIX) > $(DISTVNAME).tar$(SUFFIX)_uu
+
+$(DISTVNAME).tar$(SUFFIX) : distdir
+ $(PREOP)
+ $(TO_UNIX)
+ $(TAR) $(TARFLAGS) $(DISTVNAME).tar $(DISTVNAME)
+ $(RM_RF) $(DISTVNAME)
+ $(COMPRESS) $(DISTVNAME).tar
+ $(POSTOP)
+
+zipdist : $(DISTVNAME).zip
+ $(NOECHO) $(NOOP)
+
+$(DISTVNAME).zip : distdir
+ $(PREOP)
+ $(ZIP) $(ZIPFLAGS) $(DISTVNAME).zip $(DISTVNAME)
+ $(RM_RF) $(DISTVNAME)
+ $(POSTOP)
+
+shdist : distdir
+ $(PREOP)
+ $(SHAR) $(DISTVNAME) > $(DISTVNAME).shar
+ $(RM_RF) $(DISTVNAME)
+ $(POSTOP)
+
+
+# --- MakeMaker distdir section:
+create_distdir :
+ $(RM_RF) $(DISTVNAME)
+ $(PERLRUN) "-MExtUtils::Manifest=manicopy,maniread" \
+ -e "manicopy(maniread(),'$(DISTVNAME)', '$(DIST_CP)');"
+
+distdir : create_distdir distmeta
+ $(NOECHO) $(NOOP)
+
+
+
+# --- MakeMaker dist_test section:
+disttest : distdir
+ cd $(DISTVNAME) && $(ABSPERLRUN) Makefile.PL "INSTALLDIRS=vendor" "create_packlist=0"
+ cd $(DISTVNAME) && $(MAKE) $(PASTHRU)
+ cd $(DISTVNAME) && $(MAKE) test $(PASTHRU)
+
+
+
+# --- MakeMaker dist_ci section:
+
+ci :
+ $(PERLRUN) "-MExtUtils::Manifest=maniread" \
+ -e "@all = keys %{ maniread() };" \
+ -e "print(qq{Executing $(CI) @all\n}); system(qq{$(CI) @all});" \
+ -e "print(qq{Executing $(RCS_LABEL) ...\n}); system(qq{$(RCS_LABEL) @all});"
+
+
+# --- MakeMaker distmeta section:
+distmeta : create_distdir metafile
+ $(NOECHO) cd $(DISTVNAME) && $(ABSPERLRUN) -MExtUtils::Manifest=maniadd -e 'eval { maniadd({q{META.yml} => q{Module meta-data (added by MakeMaker)}}) } ' \
+ -e ' or print "Could not add META.yml to MANIFEST: $${'\''@'\''}\n"' --
+
+
+
+# --- MakeMaker distsignature section:
+distsignature : create_distdir
+ $(NOECHO) cd $(DISTVNAME) && $(ABSPERLRUN) -MExtUtils::Manifest=maniadd -e 'eval { maniadd({q{SIGNATURE} => q{Public-key signature (added by MakeMaker)}}) } ' \
+ -e ' or print "Could not add SIGNATURE to MANIFEST: $${'\''@'\''}\n"' --
+ $(NOECHO) cd $(DISTVNAME) && $(TOUCH) SIGNATURE
+ cd $(DISTVNAME) && cpansign -s
+
+
+
+# --- MakeMaker install section:
+
+install :: pure_install doc_install
+ $(NOECHO) $(NOOP)
+
+install_perl :: pure_perl_install doc_perl_install
+ $(NOECHO) $(NOOP)
+
+install_site :: pure_site_install doc_site_install
+ $(NOECHO) $(NOOP)
+
+install_vendor :: pure_vendor_install doc_vendor_install
+ $(NOECHO) $(NOOP)
+
+pure_install :: pure_$(INSTALLDIRS)_install
+ $(NOECHO) $(NOOP)
+
+doc_install :: doc_$(INSTALLDIRS)_install
+ $(NOECHO) $(NOOP)
+
+pure__install : pure_site_install
+ $(NOECHO) $(ECHO) INSTALLDIRS not defined, defaulting to INSTALLDIRS=site
+
+doc__install : doc_site_install
+ $(NOECHO) $(ECHO) INSTALLDIRS not defined, defaulting to INSTALLDIRS=site
+
+pure_perl_install :: all
+ $(NOECHO) umask 022; $(MOD_INSTALL) \
+ $(INST_LIB) $(DESTINSTALLPRIVLIB) \
+ $(INST_ARCHLIB) $(DESTINSTALLARCHLIB) \
+ $(INST_BIN) $(DESTINSTALLBIN) \
+ $(INST_SCRIPT) $(DESTINSTALLSCRIPT) \
+ $(INST_MAN1DIR) $(DESTINSTALLMAN1DIR) \
+ $(INST_MAN3DIR) $(DESTINSTALLMAN3DIR)
+ $(NOECHO) $(WARN_IF_OLD_PACKLIST) \
+ $(SITEARCHEXP)/auto/$(FULLEXT)
+
+
+pure_site_install :: all
+ $(NOECHO) umask 02; $(MOD_INSTALL) \
+ read $(SITEARCHEXP)/auto/$(FULLEXT)/.packlist \
+ write $(DESTINSTALLSITEARCH)/auto/$(FULLEXT)/.packlist \
+ $(INST_LIB) $(DESTINSTALLSITELIB) \
+ $(INST_ARCHLIB) $(DESTINSTALLSITEARCH) \
+ $(INST_BIN) $(DESTINSTALLSITEBIN) \
+ $(INST_SCRIPT) $(DESTINSTALLSITESCRIPT) \
+ $(INST_MAN1DIR) $(DESTINSTALLSITEMAN1DIR) \
+ $(INST_MAN3DIR) $(DESTINSTALLSITEMAN3DIR)
+ $(NOECHO) $(WARN_IF_OLD_PACKLIST) \
+ $(PERL_ARCHLIB)/auto/$(FULLEXT)
+
+pure_vendor_install :: all
+ $(NOECHO) umask 022; $(MOD_INSTALL) \
+ $(INST_LIB) $(DESTINSTALLVENDORLIB) \
+ $(INST_ARCHLIB) $(DESTINSTALLVENDORARCH) \
+ $(INST_BIN) $(DESTINSTALLVENDORBIN) \
+ $(INST_SCRIPT) $(DESTINSTALLVENDORSCRIPT) \
+ $(INST_MAN1DIR) $(DESTINSTALLVENDORMAN1DIR) \
+ $(INST_MAN3DIR) $(DESTINSTALLVENDORMAN3DIR)
+
+doc_perl_install :: all
+
+doc_site_install :: all
+ $(NOECHO) $(ECHO) Appending installation info to $(DESTINSTALLSITEARCH)/perllocal.pod
+ -$(NOECHO) umask 02; $(MKPATH) $(DESTINSTALLSITEARCH)
+ -$(NOECHO) umask 02; $(DOC_INSTALL) \
+ "Module" "$(NAME)" \
+ "installed into" "$(INSTALLSITELIB)" \
+ LINKTYPE "$(LINKTYPE)" \
+ VERSION "$(VERSION)" \
+ EXE_FILES "$(EXE_FILES)" \
+ >> $(DESTINSTALLSITEARCH)/perllocal.pod
+
+doc_vendor_install :: all
+
+
+uninstall :: uninstall_from_$(INSTALLDIRS)dirs
+ $(NOECHO) $(NOOP)
+
+uninstall_from_perldirs ::
+
+uninstall_from_sitedirs ::
+ $(NOECHO) $(UNINSTALL) $(SITEARCHEXP)/auto/$(FULLEXT)/.packlist
+
+uninstall_from_vendordirs ::
+
+
+
+# --- MakeMaker force section:
+# Phony target to force checking subdirectories.
+FORCE :
+ $(NOECHO) $(NOOP)
+
+
+# --- MakeMaker perldepend section:
+
+
+# --- MakeMaker makefile section:
+# We take a very conservative approach here, but it's worth it.
+# We move Makefile to Makefile.old here to avoid gnu make looping.
+$(FIRST_MAKEFILE) : Makefile.PL $(CONFIGDEP)
+ $(NOECHO) $(ECHO) "Makefile out-of-date with respect to $?"
+ $(NOECHO) $(ECHO) "Cleaning current config before rebuilding Makefile..."
+ -$(NOECHO) $(RM_F) $(MAKEFILE_OLD)
+ -$(NOECHO) $(MV) $(FIRST_MAKEFILE) $(MAKEFILE_OLD)
+ - $(MAKE) $(USEMAKEFILE) $(MAKEFILE_OLD) clean $(DEV_NULL)
+ $(PERLRUN) Makefile.PL "INSTALLDIRS=vendor" "create_packlist=0"
+ $(NOECHO) $(ECHO) "==> Your Makefile has been rebuilt. <=="
+ $(NOECHO) $(ECHO) "==> Please rerun the $(MAKE) command. <=="
+ $(FALSE)
+
+
+
+# --- MakeMaker staticmake section:
+
+# --- MakeMaker makeaperl section ---
+MAP_TARGET = perl
+FULLPERL = /usr/bin/perl
+
+$(MAP_TARGET) :: static $(MAKE_APERL_FILE)
+ $(MAKE) $(USEMAKEFILE) $(MAKE_APERL_FILE) $@
+
+$(MAKE_APERL_FILE) : $(FIRST_MAKEFILE) pm_to_blib
+ $(NOECHO) $(ECHO) Writing \"$(MAKE_APERL_FILE)\" for this $(MAP_TARGET)
+ $(NOECHO) $(PERLRUNINST) \
+ Makefile.PL DIR= \
+ MAKEFILE=$(MAKE_APERL_FILE) LINKTYPE=static \
+ MAKEAPERL=1 NORECURS=1 CCCDLFLAGS= \
+ INSTALLDIRS=vendor \
+ create_packlist=0
+
+
+# --- MakeMaker test section:
+
+TEST_VERBOSE=0
+TEST_TYPE=test_$(LINKTYPE)
+TEST_FILE = test.pl
+TEST_FILES =
+TESTDB_SW = -d
+
+testdb :: testdb_$(LINKTYPE)
+
+test :: $(TEST_TYPE) subdirs-test
+
+subdirs-test ::
+ $(NOECHO) $(NOOP)
+
+ $(NOECHO) $(ECHO) 'No tests defined for $(NAME) extension.'
+
+test_dynamic :: pure_all
+
+testdb_dynamic :: pure_all
+ PERL_DL_NONLAZY=1 $(FULLPERLRUN) $(TESTDB_SW) "-I$(INST_LIB)" "-I$(INST_ARCHLIB)" $(TEST_FILE)
+
+test_ : test_dynamic
+
+test_static :: test_dynamic
+testdb_static :: testdb_dynamic
+
+
+# --- MakeMaker ppd section:
+# Creates a PPD (Perl Package Description) for a binary distribution.
+ppd :
+ $(NOECHO) $(ECHO) '<SOFTPKG NAME="$(DISTNAME)" VERSION="0.01">' > $(DISTNAME).ppd
+ $(NOECHO) $(ECHO) ' <ABSTRACT></ABSTRACT>' >> $(DISTNAME).ppd
+ $(NOECHO) $(ECHO) ' <AUTHOR>Matthew Gates &lt;matthew@porpoisehead.net&gt;</AUTHOR>' >> $(DISTNAME).ppd
+ $(NOECHO) $(ECHO) ' <IMPLEMENTATION>' >> $(DISTNAME).ppd
+ $(NOECHO) $(ECHO) ' <ARCHITECTURE NAME="i686-linux-gnu-thread-multi-5.10" />' >> $(DISTNAME).ppd
+ $(NOECHO) $(ECHO) ' <CODEBASE HREF="" />' >> $(DISTNAME).ppd
+ $(NOECHO) $(ECHO) ' </IMPLEMENTATION>' >> $(DISTNAME).ppd
+ $(NOECHO) $(ECHO) '</SOFTPKG>' >> $(DISTNAME).ppd
+
+
+# --- MakeMaker pm_to_blib section:
+
+pm_to_blib : $(FIRST_MAKEFILE) $(TO_INST_PM)
+ $(NOECHO) $(ABSPERLRUN) -MExtUtils::Install -e 'pm_to_blib({@ARGV}, '\''$(INST_LIB)/auto'\'', q[$(PM_FILTER)], '\''$(PERM_DIR)'\'')' -- \
+ lib/Stuff/Gnostic.pm blib/lib/Stuff/Gnostic.pm
+ $(NOECHO) $(TOUCH) pm_to_blib
+
+
+# --- MakeMaker selfdocument section:
+
+
+# --- MakeMaker postamble section:
+
+
+# End.
View
8 modules/stuff_gnostic/Makefile.PL
@@ -0,0 +1,8 @@
+use ExtUtils::MakeMaker;
+
+WriteMakefile(
+ NAME => 'Stuff::Gnostic',
+ VERSION_FROM => 'lib/Stuff/Gnostic.pm', # finds $VERSION
+ AUTHOR => 'Matthew Gates <matthew@porpoisehead.net>',
+);
+
View
0  modules/stuff_gnostic/blib/arch/.exists
No changes.
View
0  modules/stuff_gnostic/blib/arch/auto/Stuff/Gnostic/.exists
No changes.
View
0  modules/stuff_gnostic/blib/bin/.exists
No changes.
View
0  modules/stuff_gnostic/blib/lib/Stuff/.exists
No changes.
View
180 modules/stuff_gnostic/blib/lib/Stuff/Gnostic.pm
@@ -0,0 +1,180 @@
+package Stuff::Gnostic;
+
+=head1 NAME
+
+Stuff::Gnostic - format data for parsing by Gnostic visualization tool
+
+=head1 SYNOPSIS
+
+ use Stuff::Gnostic;
+
+ my $g = new Stuff::Gnostic();
+ print $g->item($label, $value, [$timestamp]);
+
+
+=head1 DESCRIPTION
+
+Stuff::Gnostic is used to format data for output to the Gnostic data visualization
+tool.
+
+See also: http://porpoisehead.net/mysw/gnostic
+
+=head1 MEMBER FUNCTIONS
+
+=cut
+
+require Exporter;
+
+@ISA = qw(Exporter);
+@EXPORT = qw();
+@EXPORT_OK = qw();
+
+use strict;
+use vars qw($VERSION);
+use Carp;
+use Date::Manip;
+use Time::HiRes;
+use Stuff::Debug qw(db_out);
+
+BEGIN {
+ $VERSION = '0.01';
+ db_out(5, "Stuff::Gnostic version $VERSION", "M");
+}
+
+=head2 new(I<%params>)
+
+A new Stuff::Gnostic is returned. The parameters are in hash form. Valid parameters:
+
+=over
+
+=item B<Delimiter> (I<string>)
+
+The default is ';'.
+
+=item B<Format> (I<string>)
+
+Specify the format of the numeric part of the output. By default this is "%.5f".
+
+=back
+
+=cut
+
+sub new {
+ my $that = shift || croak 'object fail';
+ my $class = ref($that) || $that;
+ my %params = @_;
+ my $self = {};
+
+ if (defined($params{'Delimiter'})) { $self->{'_delimiter'} = $params{'Delimiter'}; }
+ else { $self->{'_delimiter'} = ';'; }
+
+ if (defined($params{'Format'})) { $self->{'_format'} = $params{'Format'}; }
+ else { $self->{'_format'} = '%.5f'; }
+
+ $self->{'_header_printed'} = 0;
+
+ bless $self, $class;
+
+ db_out(8,"Stuff::Gnostic->new(Delimiter => " . $self->{'_delimiter'} . ") OK", "M");
+
+ return $self;
+}
+
+1;
+
+=head2 item($label, $value, [$timestamp])
+
+Add items to the Gnostic.
+
+=cut
+
+sub item {
+ my $self = shift || croak 'object fail';
+ my $label = shift || return "";
+ my ($value, $timestamp);
+ if (!defined($_[0])) {
+ return "";
+ }
+ else {
+ $value = shift;
+ }
+
+ if (!defined($_[0])) {
+ $timestamp = Time::HiRes::time;
+ }
+ else {
+ my $dt = ParseDate($_[0]);
+ if ($dt eq "") {
+ $timestamp = Time::HiRes::time;
+ }
+ else {
+ $timestamp = UnixDate($dt, "%s");
+ if ($_[0] =~ /:\d\d(\.\d+)$/) {
+ $timestamp .= $1;
+ }
+ }
+ }
+ $timestamp = int($timestamp * 1000);
+
+ my $f = $self->{'_format'};
+ my $d = $self->{'_delimiter'};
+
+ my $h = $self->header();
+ return sprintf "$h%s%s${f}%s%s\n", $timestamp, $d, $value, $d, $label;
+}
+
+=head2 header($force)
+
+Returns the Gnostic header. Unless force is defined and is not 0, this function
+will only return something the first time it is called. Subsequent calls without
+$force set will return "". You probably never need to call this yourself as the
+first call to item() will include the output of this call.
+
+=cut
+
+sub header {
+ my $self = shift || croak 'object fail';
+ my $force;
+ if (defined($_[0])) {
+ $force = 1;
+ }
+ if (!$self->{'_header_printed'} || $force) {
+ my $res = "";
+ $res .= "GNOSTIC-DATA-PROTOCOL-VERSION=1.0\n";
+ $res .= "DELIMITER=" . $self->{'_delimiter'} . "\n";
+ $res .= "END-HEADER\n";
+ $self->{'_header_printed'} = 1;
+ return $res;
+ }
+ else {
+ return "";
+ }
+}
+
+1;
+
+__END__
+
+=head1 AUTHOR
+
+Matthew Gates E<lt>matthew@porpoisehead.netE<gt>
+
+=head1 COPYRIGHT & LICENSE
+
+Copyright (C) 2011 by Matthew Gates
+
+This library is released under the terms of the GNU LGPL Version 3, 29 June 2007.
+A copy of this license should have been provided with this software (filename
+LICENSE.LGPL). The license may also be found at
+http://www.gnu.org/licenses/lgpl.html
+
+=head1 BUGS
+
+Reports to the author please.
+
+=head1 SEE ALSO
+
+Stuff(7)
+
+=cut
+
View
0  modules/stuff_gnostic/blib/lib/auto/Stuff/Gnostic/.exists
No changes.
View
0  modules/stuff_gnostic/blib/man1/.exists
No changes.
View
0  modules/stuff_gnostic/blib/man3/.exists
No changes.
View
186 modules/stuff_gnostic/blib/man3/Stuff::Gnostic.3pm
@@ -0,0 +1,186 @@
+.\" Automatically generated by Pod::Man 2.22 (Pod::Simple 3.07)
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sp \" Vertical space (when we can't use .PP)
+.if t .sp .5v
+.if n .sp
+..
+.de Vb \" Begin verbatim text
+.ft CW
+.nf
+.ne \\$1
+..
+.de Ve \" End verbatim text
+.ft R
+.fi
+..
+.\" Set up some character translations and predefined strings. \*(-- will
+.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
+.\" double quote, and \*(R" will give a right double quote. \*(C+ will
+.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
+.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
+.\" nothing in troff, for use with C<>.
+.tr \(*W-
+.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
+.ie n \{\
+. ds -- \(*W-
+. ds PI pi
+. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
+. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
+. ds L" ""
+. ds R" ""
+. ds C` ""
+. ds C' ""
+'br\}
+.el\{\
+. ds -- \|\(em\|
+. ds PI \(*p
+. ds L" ``
+. ds R" ''
+'br\}
+.\"
+.\" Escape single quotes in literal strings from groff's Unicode transform.
+.ie \n(.g .ds Aq \(aq
+.el .ds Aq '
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
+.\" entries marked with X<> in POD. Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.ie \nF \{\
+. de IX
+. tm Index:\\$1\t\\n%\t"\\$2"
+..
+. nr % 0
+. rr F
+.\}
+.el \{\
+. de IX
+..
+.\}
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear. Run. Save yourself. No user-serviceable parts.
+. \" fudge factors for nroff and troff
+.if n \{\
+. ds #H 0
+. ds #V .8m
+. ds #F .3m
+. ds #[ \f1
+. ds #] \fP
+.\}
+.if t \{\
+. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+. ds #V .6m
+. ds #F 0
+. ds #[ \&
+. ds #] \&
+.\}
+. \" simple accents for nroff and troff
+.if n \{\
+. ds ' \&
+. ds ` \&
+. ds ^ \&
+. ds , \&
+. ds ~ ~
+. ds /
+.\}
+.if t \{\
+. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+. \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+. \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+. \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+. ds : e
+. ds 8 ss
+. ds o a
+. ds d- d\h'-1'\(ga
+. ds D- D\h'-1'\(hy
+. ds th \o'bp'
+. ds Th \o'LP'
+. ds ae ae
+. ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "Stuff::Gnostic 3pm"
+.TH Stuff::Gnostic 3pm "2011-03-28" "perl v5.10.1" "User Contributed Perl Documentation"
+.\" For nroff, turn off justification. Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.if n .ad l
+.nh
+.SH "NAME"
+Stuff::Gnostic \- format data for parsing by Gnostic visualization tool
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+.Vb 1
+\& use Stuff::Gnostic;
+\&
+\& my $g = new Stuff::Gnostic();
+\& print $g\->item($label, $value, [$timestamp]);
+.Ve
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+Stuff::Gnostic is used to format data for output to the Gnostic data visualization
+tool.
+.PP
+See also: http://porpoisehead.net/mysw/gnostic
+.SH "MEMBER FUNCTIONS"
+.IX Header "MEMBER FUNCTIONS"
+.ie n .SS "new(\fI\fP\fI%params\fP\fI\fP)"
+.el .SS "new(\fI\fP\f(CI%params\fP\fI\fP)"
+.IX Subsection "new(%params)"
+A new Stuff::Gnostic is returned. The parameters are in hash form. Valid parameters:
+.IP "\fBDelimiter\fR (\fIstring\fR)" 4
+.IX Item "Delimiter (string)"
+The default is ';'.
+.IP "\fBFormat\fR (\fIstring\fR)" 4
+.IX Item "Format (string)"
+Specify the format of the numeric part of the output. By default this is \*(L"%.5f\*(R".
+.ie n .SS "item($label, $value, [$timestamp])"
+.el .SS "item($label, \f(CW$value\fP, [$timestamp])"
+.IX Subsection "item($label, $value, [$timestamp])"
+Add items to the Gnostic.
+.SS "header($force)"
+.IX Subsection "header($force)"
+Returns the Gnostic header. Unless force is defined and is not 0, this function
+will only return something the first time it is called. Subsequent calls without
+\&\f(CW$force\fR set will return "". You probably never need to call this yourself as the
+first call to \fIitem()\fR will include the output of this call.
+.SH "AUTHOR"
+.IX Header "AUTHOR"
+Matthew Gates <matthew@porpoisehead.net>
+.SH "COPYRIGHT & LICENSE"
+.IX Header "COPYRIGHT & LICENSE"
+Copyright (C) 2011 by Matthew Gates
+.PP
+This library is released under the terms of the \s-1GNU\s0 \s-1LGPL\s0 Version 3, 29 June 2007.
+A copy of this license should have been provided with this software (filename
+\&\s-1LICENSE\s0.LGPL). The license may also be found at
+http://www.gnu.org/licenses/lgpl.html
+.SH "BUGS"
+.IX Header "BUGS"
+Reports to the author please.
+.SH "SEE ALSO"
+.IX Header "SEE ALSO"
+\&\fIStuff\fR\|(7)
View
0  modules/stuff_gnostic/blib/script/.exists
No changes.
View
5 modules/stuff_gnostic/debian/changelog
@@ -0,0 +1,5 @@
+libstuff-gnostic-perl (0.01-1) maverick; urgency=low
+
+ * Initial Release.
+
+ -- Matthew Gates <matthew@porpoisehead.net> Mon, 28 Mar 2011 22:15:00 +0000
View
1  modules/stuff_gnostic/debian/compat
@@ -0,0 +1 @@
+7
View
16 modules/stuff_gnostic/debian/control
@@ -0,0 +1,16 @@
+Source: libstuff-gnostic-perl
+Section: perl
+Priority: optional
+Build-Depends: debhelper (>= 7)
+Build-Depends-Indep: perl
+Maintainer: Matthew Gates <matthew@porpoisehead.net>
+Standards-Version: 3.8.4
+Homepage: https://launchpad.net/stufftools/
+
+Package: libstuff-gnostic-perl
+Architecture: all
+Depends: ${misc:Depends}, ${perl:Depends}, libstuff-debug-perl, libdate-manip-perl
+Description: Stuff::Gnostic
+ Stuff::Gnostic is an object module that formats data for the
+ Gnostic visualization tool.
+ See http://porpoisehead.net/mysw/gnostic for more details.
View
29 modules/stuff_gnostic/debian/copyright
@@ -0,0 +1,29 @@
+Format-Specification: http://svn.debian.org/wsvn/dep/web/deps/dep5.mdwn?op=file&rev=135
+Maintainer: Matthew Gates <matthew@porpoisehead.net>
+Source: https://launchpad.net/stufftools/
+Name: Stuff-Gnostic
+
+Files: *
+Copyright: Matthew Gates <matthew@porpoisehead.net>
+License: LGPL-3+
+
+Files: debian/*
+Copyright: 2010, Matthew Gates <matthew@porpoisehead.net>
+License: Artistic
+
+License: LGPL-3+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 3 dated June, 2007, or (at your
+ option) any later version
+ .
+ On Debian GNU/Linux systems, the complete text of version 3 of the GNU
+ General Public License can be found in `/usr/share/common-licenses/GPL-3'
+
+License: Artistic
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the Artistic License, which comes with Perl.
+ .
+ On Debian GNU/Linux systems, the complete text of the Artistic License
+ can be found in `/usr/share/common-licenses/Artistic'
+
View
1  modules/stuff_gnostic/debian/files
@@ -0,0 +1 @@
+libstuff-gnostic-perl_0.01-1_all.deb perl optional
View
45 modules/stuff_gnostic/debian/libstuff-gnostic-perl.debhelper.log
@@ -0,0 +1,45 @@
+dh_auto_configure
+dh_auto_build
+dh_auto_test
+dh_prep
+dh_installdirs
+dh_auto_install
+dh_install
+dh_installdocs
+dh_installchangelogs
+dh_installexamples
+dh_installman
+dh_installcatalogs
+dh_installcron
+dh_installdebconf
+dh_installemacsen
+dh_installifupdown
+dh_installinfo
+dh_pysupport
+dh_installinit
+dh_installmenu
+dh_installmime
+dh_installmodules
+dh_installlogcheck
+dh_installlogrotate
+dh_installpam
+dh_installppp
+dh_installudev
+dh_installwm
+dh_installxfonts
+dh_bugfiles
+dh_lintian
+dh_gconf
+dh_icons
+dh_perl
+dh_usrlocal
+dh_link
+dh_compress
+dh_fixperms
+dh_strip
+dh_makeshlibs
+dh_shlibdeps
+dh_installdeb
+dh_gencontrol
+dh_md5sums
+dh_builddeb
View
2  modules/stuff_gnostic/debian/libstuff-gnostic-perl.substvars
@@ -0,0 +1,2 @@
+perl:Depends=perl
+misc:Depends=
View
13 modules/stuff_gnostic/debian/libstuff-gnostic-perl/DEBIAN/control
@@ -0,0 +1,13 @@
+Package: libstuff-gnostic-perl
+Version: 0.01-1
+Architecture: all
+Maintainer: Matthew Gates <matthew@porpoisehead.net>
+Installed-Size: 56
+Depends: perl, libstuff-debug-perl, libdate-manip-perl
+Section: perl
+Priority: optional
+Homepage: https://launchpad.net/stufftools/
+Description: Stuff::Gnostic
+ Stuff::Gnostic is an object module that formats data for the
+ Gnostic visualization tool.
+ See http://porpoisehead.net/mysw/gnostic for more details.
View
4 modules/stuff_gnostic/debian/libstuff-gnostic-perl/DEBIAN/md5sums
@@ -0,0 +1,4 @@
+12306ce5ad9821e7cd35b1c47e25d0d4 usr/share/doc/libstuff-gnostic-perl/changelog.Debian.gz
+5526984150042163924c6cbdcd150d64 usr/share/doc/libstuff-gnostic-perl/copyright
+69f9b4305be147166938794b9f285e1b usr/share/man/man3/Stuff::Gnostic.3pm.gz
+be879a877309f2d9fc05b3ce6de7a3b4 usr/share/perl5/Stuff/Gnostic.pm
View
BIN  modules/stuff_gnostic/debian/libstuff-gnostic-perl/usr/share/doc/libstuff-gnostic-perl/changelog.Debian.gz
Binary file not shown
View
29 modules/stuff_gnostic/debian/libstuff-gnostic-perl/usr/share/doc/libstuff-gnostic-perl/copyright
@@ -0,0 +1,29 @@
+Format-Specification: http://svn.debian.org/wsvn/dep/web/deps/dep5.mdwn?op=file&rev=135
+Maintainer: Matthew Gates <matthew@porpoisehead.net>
+Source: https://launchpad.net/stufftools/
+Name: Stuff-Gnostic
+
+Files: *
+Copyright: Matthew Gates <matthew@porpoisehead.net>
+License: LGPL-3+
+
+Files: debian/*
+Copyright: 2010, Matthew Gates <matthew@porpoisehead.net>
+License: Artistic
+
+License: LGPL-3+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 3 dated June, 2007, or (at your
+ option) any later version
+ .
+ On Debian GNU/Linux systems, the complete text of version 3 of the GNU
+ General Public License can be found in `/usr/share/common-licenses/GPL-3'
+
+License: Artistic
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the Artistic License, which comes with Perl.
+ .
+ On Debian GNU/Linux systems, the complete text of the Artistic License
+ can be found in `/usr/share/common-licenses/Artistic'
+
View
BIN  modules/stuff_gnostic/debian/libstuff-gnostic-perl/usr/share/man/man3/Stuff::Gnostic.3pm.gz
Binary file not shown
View
180 modules/stuff_gnostic/debian/libstuff-gnostic-perl/usr/share/perl5/Stuff/Gnostic.pm
@@ -0,0 +1,180 @@
+package Stuff::Gnostic;
+
+=head1 NAME
+
+Stuff::Gnostic - format data for parsing by Gnostic visualization tool
+
+=head1 SYNOPSIS
+
+ use Stuff::Gnostic;
+
+ my $g = new Stuff::Gnostic();
+ print $g->item($label, $value, [$timestamp]);
+
+
+=head1 DESCRIPTION
+
+Stuff::Gnostic is used to format data for output to the Gnostic data visualization
+tool.
+
+See also: http://porpoisehead.net/mysw/gnostic
+
+=head1 MEMBER FUNCTIONS
+
+=cut
+
+require Exporter;
+
+@ISA = qw(Exporter);
+@EXPORT = qw();
+@EXPORT_OK = qw();
+
+use strict;
+use vars qw($VERSION);
+use Carp;
+use Date::Manip;
+use Time::HiRes;
+use Stuff::Debug qw(db_out);
+
+BEGIN {
+ $VERSION = '0.01';
+ db_out(5, "Stuff::Gnostic version $VERSION", "M");
+}
+
+=head2 new(I<%params>)
+
+A new Stuff::Gnostic is returned. The parameters are in hash form. Valid parameters:
+
+=over
+
+=item B<Delimiter> (I<string>)
+
+The default is ';'.
+
+=item B<Format> (I<string>)
+
+Specify the format of the numeric part of the output. By default this is "%.5f".
+
+=back
+
+=cut
+
+sub new {
+ my $that = shift || croak 'object fail';
+ my $class = ref($that) || $that;
+ my %params = @_;
+ my $self = {};
+
+ if (defined($params{'Delimiter'})) { $self->{'_delimiter'} = $params{'Delimiter'}; }
+ else { $self->{'_delimiter'} = ';'; }
+
+ if (defined($params{'Format'})) { $self->{'_format'} = $params{'Format'}; }
+ else { $self->{'_format'} = '%.5f'; }
+
+ $self->{'_header_printed'} = 0;
+
+ bless $self, $class;
+
+ db_out(8,"Stuff::Gnostic->new(Delimiter => " . $self->{'_delimiter'} . ") OK", "M");
+
+ return $self;
+}
+
+1;
+
+=head2 item($label, $value, [$timestamp])
+
+Add items to the Gnostic.
+
+=cut
+
+sub item {
+ my $self = shift || croak 'object fail';
+ my $label = shift || return "";
+ my ($value, $timestamp);
+ if (!defined($_[0])) {
+ return "";
+ }
+ else {
+ $value = shift;
+ }
+
+ if (!defined($_[0])) {
+ $timestamp = Time::HiRes::time;
+ }
+ else {
+ my $dt = ParseDate($_[0]);
+ if ($dt eq "") {
+ $timestamp = Time::HiRes::time;
+ }
+ else {
+ $timestamp = UnixDate($dt, "%s");
+ if ($_[0] =~ /:\d\d(\.\d+)$/) {
+ $timestamp .= $1;
+ }
+ }
+ }
+ $timestamp = int($timestamp * 1000);
+
+ my $f = $self->{'_format'};
+ my $d = $self->{'_delimiter'};
+
+ my $h = $self->header();
+ return sprintf "$h%s%s${f}%s%s\n", $timestamp, $d, $value, $d, $label;
+}
+
+=head2 header($force)
+
+Returns the Gnostic header. Unless force is defined and is not 0, this function
+will only return something the first time it is called. Subsequent calls without
+$force set will return "". You probably never need to call this yourself as the
+first call to item() will include the output of this call.
+
+=cut
+
+sub header {
+ my $self = shift || croak 'object fail';
+ my $force;
+ if (defined($_[0])) {
+ $force = 1;
+ }
+ if (!$self->{'_header_printed'} || $force) {
+ my $res = "";
+ $res .= "GNOSTIC-DATA-PROTOCOL-VERSION=1.0\n";
+ $res .= "DELIMITER=" . $self->{'_delimiter'} . "\n";
+ $res .= "END-HEADER\n";
+ $self->{'_header_printed'} = 1;
+ return $res;
+ }
+ else {
+ return "";
+ }
+}
+
+1;
+
+__END__
+
+=head1 AUTHOR
+
+Matthew Gates E<lt>matthew@porpoisehead.netE<gt>
+
+=head1 COPYRIGHT & LICENSE
+
+Copyright (C) 2011 by Matthew Gates
+
+This library is released under the terms of the GNU LGPL Version 3, 29 June 2007.
+A copy of this license should have been provided with this software (filename
+LICENSE.LGPL). The license may also be found at
+http://www.gnu.org/licenses/lgpl.html
+
+=head1 BUGS
+
+Reports to the author please.
+
+=head1 SEE ALSO
+
+Stuff(7)
+
+=cut
+
View
4 modules/stuff_gnostic/debian/rules
@@ -0,0 +1,4 @@
+#!/usr/bin/make -f
+
+%:
+ dh $@
View
2  modules/stuff_gnostic/debian/watch
@@ -0,0 +1,2 @@
+version=3
+http://search.cpan.org/dist/Stuff-Gnostic/ .*/Stuff-Gnostic-v?(\d[\d.-]+)\.(?:tar(?:\.gz|\.bz2)?|tgz|zip)$
View
180 modules/stuff_gnostic/lib/Stuff/Gnostic.pm
@@ -0,0 +1,180 @@
+package Stuff::Gnostic;
+
+=head1 NAME
+
+Stuff::Gnostic - format data for parsing by Gnostic visualization tool
+
+=head1 SYNOPSIS
+
+ use Stuff::Gnostic;
+
+ my $g = new Stuff::Gnostic();
+ print $g->item($label, $value, [$timestamp]);
+
+
+=head1 DESCRIPTION
+
+Stuff::Gnostic is used to format data for output to the Gnostic data visualization
+tool.
+
+See also: http://porpoisehead.net/mysw/gnostic
+
+=head1 MEMBER FUNCTIONS
+
+=cut
+
+require Exporter;
+
+@ISA = qw(Exporter);
+@EXPORT = qw();
+@EXPORT_OK = qw();
+
+use strict;
+use vars qw($VERSION);
+use Carp;
+use Date::Manip;
+use Time::HiRes;
+use Stuff::Debug qw(db_out);
+
+BEGIN {
+ $VERSION = '0.01';
+ db_out(5, "Stuff::Gnostic version $VERSION", "M");
+}
+
+=head2 new(I<%params>)
+
+A new Stuff::Gnostic is returned. The parameters are in hash form. Valid parameters:
+
+=over
+
+=item B<Delimiter> (I<string>)
+
+The default is ';'.
+
+=item B<Format> (I<string>)
+
+Specify the format of the numeric part of the output. By default this is "%.5f".
+
+=back
+
+=cut
+
+sub new {
+ my $that = shift || croak 'object fail';
+ my $class = ref($that) || $that;
+ my %params = @_;
+ my $self = {};
+
+ if (defined($params{'Delimiter'})) { $self->{'_delimiter'} = $params{'Delimiter'}; }
+ else { $self->{'_delimiter'} = ';'; }
+
+ if (defined($params{'Format'})) { $self->{'_format'} = $params{'Format'}; }
+ else { $self->{'_format'} = '%.5f'; }
+
+ $self->{'_header_printed'} = 0;
+
+ bless $self, $class;
+
+ db_out(8,"Stuff::Gnostic->new(Delimiter => " . $self->{'_delimiter'} . ") OK", "M");
+
+ return $self;
+}
+
+1;
+
+=head2 item($label, $value, [$timestamp])
+
+Add items to the Gnostic.
+
+=cut
+
+sub item {
+ my $self = shift || croak 'object fail';
+ my $label = shift || return "";
+ my ($value, $timestamp);
+ if (!defined($_[0])) {
+ return "";
+ }
+ else {
+ $value = shift;
+ }
+
+ if (!defined($_[0])) {
+ $timestamp = Time::HiRes::time;
+ }
+ else {
+ my $dt = ParseDate($_[0]);
+ if ($dt eq "") {
+ $timestamp = Time::HiRes::time;
+ }
+ else {
+ $timestamp = UnixDate($dt, "%s");
+ if ($_[0] =~ /:\d\d(\.\d+)$/) {
+ $timestamp .= $1;
+ }
+ }
+ }
+ $timestamp = int($timestamp * 1000);
+
+ my $f = $self->{'_format'};
+ my $d = $self->{'_delimiter'};
+
+ my $h = $self->header();
+ return sprintf "$h%s%s${f}%s%s\n", $timestamp, $d, $value, $d, $label;
+}
+
+=head2 header($force)
+
+Returns the Gnostic header. Unless force is defined and is not 0, this function
+will only return something the first time it is called. Subsequent calls without
+$force set will return "". You probably never need to call this yourself as the
+first call to item() will include the output of this call.
+
+=cut
+
+sub header {
+ my $self = shift || croak 'object fail';
+ my $force;
+ if (defined($_[0])) {
+ $force = 1;
+ }
+ if (!$self->{'_header_printed'} || $force) {
+ my $res = "";
+ $res .= "GNOSTIC-DATA-PROTOCOL-VERSION=1.0\n";
+ $res .= "DELIMITER=" . $self->{'_delimiter'} . "\n";
+ $res .= "END-HEADER\n";
+ $self->{'_header_printed'} = 1;
+ return $res;
+ }
+ else {
+ return "";
+ }
+}
+
+1;
+
+__END__
+
+=head1 AUTHOR
+
+Matthew Gates E<lt>matthew@porpoisehead.netE<gt>
+
+=head1 COPYRIGHT & LICENSE
+
+Copyright (C) 2011 by Matthew Gates
+
+This library is released under the terms of the GNU LGPL Version 3, 29 June 2007.
+A copy of this license should have been provided with this software (filename
+LICENSE.LGPL). The license may also be found at
+http://www.gnu.org/licenses/lgpl.html
+
+=head1 BUGS
+
+Reports to the author please.
+
+=head1 SEE ALSO
+
+Stuff(7)
+
+=cut
+
View
0  modules/stuff_gnostic/pm_to_blib
No changes.
Please sign in to comment.
Something went wrong with that request. Please try again.