Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoyafeng committed Jul 30, 2011
0 parents commit e80de4e
Show file tree
Hide file tree
Showing 31 changed files with 1,714 additions and 0 deletions.
68 changes: 68 additions & 0 deletions Build
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
#!perl

use strict;
use Cwd;
use File::Basename;
use File::Spec;

sub magic_number_matches {
return 0 unless -e '_build\\magicnum';
local *FH;
open FH, '_build\\magicnum' or return 0;
my $filenum = <FH>;
close FH;
return $filenum == 206756;
}

my $progname;
my $orig_dir;
BEGIN {
$^W = 1; # Use warnings
$progname = basename($0);
$orig_dir = Cwd::cwd();
my $base_dir = 'C:\\C3000';
if (!magic_number_matches()) {
unless (chdir($base_dir)) {
die ("Couldn't chdir($base_dir), aborting\n");
}
unless (magic_number_matches()) {
die ("Configuration seems to be out of date, please re-run 'perl Build.PL' again.\n");
}
}
unshift @INC,
(
'C:\\strawberry\\perl\\site\\lib',
'C:\\strawberry\\perl\\vendor\\lib',
'C:\\strawberry\\perl\\lib',
'C:\\Perl\\site\\lib',
'C:\\perl\\lib',
'C:\\oracle\\product\\10.2.0\\db_1\\perl\\5.8.3\\lib\\MSWin32-x86',
'C:\\oracle\\product\\10.2.0\\db_1\\perl\\5.8.3\\lib\\MSWin32-x86-multi-thread',
'C:\\oracle\\product\\10.2.0\\db_1\\perl\\5.8.3\\lib',
'C:\\oracle\\product\\10.2.0\\db_1\\perl\\site\\5.8.3',
'C:\\oracle\\product\\10.2.0\\db_1\\perl\\site\\5.8.3\\lib\\MSWin32-x86-multi-thread',
'C:\\oracle\\product\\10.2.0\\db_1\\perl\\site\\5.8.3\\lib',
'C:\\oracle\\product\\10.2.0\\db_1\\sysman\\admin\\scripts'
);
}

close(*DATA) unless eof(*DATA); # ensure no open handles to this script

use Module::Build;

# Some platforms have problems setting $^X in shebang contexts, fix it up here
$^X = Module::Build->find_perl_interpreter;

if (-e 'Build.PL' and not Module::Build->up_to_date('Build.PL', $progname)) {
warn "Warning: Build.PL has been altered. You may need to run 'perl Build.PL' again.\n";
}

# This should have just enough arguments to be able to bootstrap the rest.
my $build = Module::Build->resume (
properties => {
config_dir => '_build',
orig_dir => $orig_dir,
},
);

$build->dispatch;
21 changes: 21 additions & 0 deletions Build.PL
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
use 5.006;
use strict;
use warnings;
use Module::Build;

my $builder = Module::Build->new(
module_name => 'C3000',
license => 'perl',
dist_author => q{Andy Xiao <[email protected]>},
dist_version_from => 'lib/C3000.pm',
build_requires => {
'Test::More' => 0,
},
requires => {
'perl' => 5.006,
},
add_to_cleanup => [ 'C3000-*' ],
create_makefile_pl => 'traditional',
);

$builder->create_build_script();
84 changes: 84 additions & 0 deletions Build.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
@rem = '--*-Perl-*--
@echo off
if "%OS%" == "Windows_NT" goto WinNT
perl -x -S "%0" --build_bat %1 %2 %3 %4 %5 %6 %7 %8 %9
goto endofperl
:WinNT
perl -x -S %0 --build_bat %*
if NOT "%COMSPEC%" == "%SystemRoot%\system32\cmd.exe" goto endofperl
if %errorlevel% == 9009 echo You do not have Perl in your PATH.
if errorlevel 1 goto script_failed_so_exit_with_non_zero_val 2>nul
goto endofperl
@rem ';
#!perl
#line 15

use strict;
use Cwd;
use File::Basename;
use File::Spec;

sub magic_number_matches {
return 0 unless -e '_build\\magicnum';
local *FH;
open FH, '_build\\magicnum' or return 0;
my $filenum = <FH>;
close FH;
return $filenum == 206756;
}

my $progname;
my $orig_dir;
BEGIN {
$^W = 1; # Use warnings
$progname = basename($0);
$orig_dir = Cwd::cwd();
my $base_dir = 'C:\\C3000';
if (!magic_number_matches()) {
unless (chdir($base_dir)) {
die ("Couldn't chdir($base_dir), aborting\n");
}
unless (magic_number_matches()) {
die ("Configuration seems to be out of date, please re-run 'perl Build.PL' again.\n");
}
}
unshift @INC,
(
'C:\\strawberry\\perl\\site\\lib',
'C:\\strawberry\\perl\\vendor\\lib',
'C:\\strawberry\\perl\\lib',
'C:\\Perl\\site\\lib',
'C:\\perl\\lib',
'C:\\oracle\\product\\10.2.0\\db_1\\perl\\5.8.3\\lib\\MSWin32-x86',
'C:\\oracle\\product\\10.2.0\\db_1\\perl\\5.8.3\\lib\\MSWin32-x86-multi-thread',
'C:\\oracle\\product\\10.2.0\\db_1\\perl\\5.8.3\\lib',
'C:\\oracle\\product\\10.2.0\\db_1\\perl\\site\\5.8.3',
'C:\\oracle\\product\\10.2.0\\db_1\\perl\\site\\5.8.3\\lib\\MSWin32-x86-multi-thread',
'C:\\oracle\\product\\10.2.0\\db_1\\perl\\site\\5.8.3\\lib',
'C:\\oracle\\product\\10.2.0\\db_1\\sysman\\admin\\scripts'
);
}

close(*DATA) unless eof(*DATA); # ensure no open handles to this script

use Module::Build;

# Some platforms have problems setting $^X in shebang contexts, fix it up here
$^X = Module::Build->find_perl_interpreter;

if (-e 'Build.PL' and not Module::Build->up_to_date('Build.PL', $progname)) {
warn "Warning: Build.PL has been altered. You may need to run 'perl Build.PL' again.\n";
}

# This should have just enough arguments to be able to bootstrap the rest.
my $build = Module::Build->resume (
properties => {
config_dir => '_build',
orig_dir => $orig_dir,
},
);

$build->dispatch;

__END__
:endofperl
5 changes: 5 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Revision history for C3000

0.01 Date/time
First version, released on an unsuspecting world.

12 changes: 12 additions & 0 deletions MANIFEST
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
Build.PL
Changes
ignore.txt
lib/C3000.pm
MANIFEST This list of files
README
t/00-load.t
t/01-func.t
t/boilerplate.t
t/manifest.t
t/pod-coverage.t
t/pod.t
15 changes: 15 additions & 0 deletions MANIFEST.SKIP.bak
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!include_default
# Avoid configuration metadata file
^MYMETA\.

# Avoid Module::Build generated and utility files.
\bBuild$
\bBuild.bat$
\b_build
\bBuild.COM$
\bBUILD.COM$
\bbuild.com$
^MANIFEST\.SKIP

# Avoid archives of this distribution
\bC3000-[\d\.\_]+
9 changes: 9 additions & 0 deletions MANIFEST.bak
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Build.PL
Changes
lib/C3000.pm
MANIFEST This list of files
README
t/00-load.t
t/manifest.t
t/pod-coverage.t
t/pod.t
22 changes: 22 additions & 0 deletions MYMETA.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
abstract: ~
author:
- 'Andy Xiao <[email protected]>'
build_requires:
Test::More: 0
dynamic_config: 0
generated_by: 'Module::Build version 0.3617'
license: perl
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
version: 1.4
name: C3000
provides:
C3000:
file: lib/C3000.pm
version: 0.01
requires:
perl: 5.006
resources:
license: http://dev.perl.org/licenses/
version: 0.01
55 changes: 55 additions & 0 deletions README
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
C3000

The README is used to introduce the module and provide instructions on
how to install the module, any machine dependencies it may have (for
example C compilers and installed libraries) and any other information
that should be provided before the module is installed.

A README file is required for CPAN modules since CPAN extracts the README
file from a module distribution so that people browsing the archive
can use it to get an idea of the module's uses. It is usually a good idea
to provide version information here so that people can decide whether
fixes for the module are worth downloading.


INSTALLATION

To install this module, run the following commands:

perl Build.PL
./Build
./Build test
./Build install

SUPPORT AND DOCUMENTATION

After installing, you can find documentation for this module with the
perldoc command.

perldoc C3000

You can also look for information at:

RT, CPAN's request tracker (report bugs here)
http://rt.cpan.org/NoAuth/Bugs.html?Dist=C3000

AnnoCPAN, Annotated CPAN documentation
http://annocpan.org/dist/C3000

CPAN Ratings
http://cpanratings.perl.org/d/C3000

Search CPAN
http://search.cpan.org/dist/C3000/


LICENSE AND COPYRIGHT

Copyright (C) 2011 Andy Xiao

This program is free software; you can redistribute it and/or modify it
under the terms of either: the GNU General Public License as published
by the Free Software Foundation; or the Artistic License.

See http://dev.perl.org/licenses/ for more information.

2 changes: 2 additions & 0 deletions _build/auto_features
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
do{ my $x = {};
$x; }
Loading

0 comments on commit e80de4e

Please sign in to comment.