[svn:parrot] r36860 - in trunk: . runtime/parrot/library/File runtime/parrot/library/File/Spec t/library

coke at svn.parrot.org coke at svn.parrot.org
Wed Feb 18 18:35:51 UTC 2009


Author: coke
Date: Wed Feb 18 18:35:51 2009
New Revision: 36860
URL: https://trac.parrot.org/parrot/changeset/36860

Log:
TT #109 - remove File::Spec

Deleted:
   trunk/runtime/parrot/library/File/Spec/
   trunk/runtime/parrot/library/File/Spec.pir
   trunk/t/library/File_Spec.t
Modified:
   trunk/DEPRECATED.pod
   trunk/MANIFEST

Modified: trunk/DEPRECATED.pod
==============================================================================
--- trunk/DEPRECATED.pod	Wed Feb 18 18:11:33 2009	(r36859)
+++ trunk/DEPRECATED.pod	Wed Feb 18 18:35:51 2009	(r36860)
@@ -160,10 +160,6 @@
 
 Replace usage with the escape opcode.  See TT #107
 
-=item File::Spec [post 0.9.1]
-
-See TT #109
-
 =item tools/build/dynoplibs.pl and tools/build/dynpmc.pl [post 0.9.1]
 
 Replaced with makefiles. See TT #338.

Modified: trunk/MANIFEST
==============================================================================
--- trunk/MANIFEST	Wed Feb 18 18:11:33 2009	(r36859)
+++ trunk/MANIFEST	Wed Feb 18 18:35:51 2009	(r36860)
@@ -1,7 +1,7 @@
 # ex: set ro:
 # $Id$
 #
-# generated by tools/dev/mk_manifest_and_skip.pl Wed Feb 18 00:40:07 2009 UT
+# generated by tools/dev/mk_manifest_and_skip.pl Wed Feb 18 18:14:23 2009 UT
 #
 # See tools/dev/install_files.pl for documentation on the
 # format of this file.
@@ -2015,9 +2015,6 @@
 runtime/parrot/library/Data/Escape.pir                      [library]
 runtime/parrot/library/Data/Replace.pir                     [library]
 runtime/parrot/library/Digest/MD5.pir                       [library]
-runtime/parrot/library/File/Spec.pir                        [library]
-runtime/parrot/library/File/Spec/Unix.pir                   [library]
-runtime/parrot/library/File/Spec/Win32.pir                  [library]
 runtime/parrot/library/Getopt/Obj.pir                       [library]
 runtime/parrot/library/HTTP/Daemon.pir                      [library]
 runtime/parrot/library/Iter.pir                             [library]
@@ -2556,7 +2553,6 @@
 t/examples/subs.t                                           [test]
 t/examples/tutorial.t                                       [test]
 t/harness                                                   [test]
-t/library/File_Spec.t                                       [test]
 t/library/cgi_query_hash.t                                  [test]
 t/library/coroutine.t                                       [test]
 t/library/data_escape.t                                     [test]

Deleted: trunk/runtime/parrot/library/File/Spec.pir
==============================================================================
--- trunk/runtime/parrot/library/File/Spec.pir	Wed Feb 18 18:35:51 2009	(r36859)
+++ /dev/null	00:00:00 1970	(deleted)
@@ -1,166 +0,0 @@
-=head1 TITLE
-
-File::Spec - portably perform operations on file names
-
-=head1 SYNOPSIS
-
-    .local int classtype
-    .local pmc spec
-
-    load_bytecode 'File/Spec.pir'
-
-    new spec, 'File::Spec'
-
-    .local pmc x
-    .local String a, b, c
-    x= spec.'catdir'( 'a', 'b', 'c' )
-
-which returns 'a/b/c' under Unix.
-
-=head1 DESCRIPTION
-
-This module is designed to support operations commonly performed on file
-specifications (usually called "file names", but not to be confused with the
-contents of a file, or Perl's file handles), such as concatenating several
-directory and file names into a single path, or determining whether a path
-is rooted. It is based on code directly taken from MakeMaker 5.17, code
-written by Andreas KE<ouml>nig, Andy Dougherty, Charles Bailey, Ilya
-Zakharevich, Paul Schinder, and others.
-
-Since these functions are different for most operating systems, each set of
-OS specific routines is available in a separate module, including:
-
-    File::Spec::Unix
-    *File::Spec::Mac
-    *File::Spec::OS2
-    File::Spec::Win32
-    *File::Spec::VMS
-
-*These modules have not yet been created in this release.
-
-The module appropriate for the current OS is automatically loaded by
-File::Spec. Since some modules (like VMS) make use of facilities available
-only under that OS, it may not be possible to load all modules under all
-operating systems.
-
-Since File::Spec is object oriented, subroutines should not be called directly,
-and since parrot does not yet support class methods, subroutines should be
-called as object methods.
-
-=cut
-
-
-.namespace [ 'File::Spec' ]
-
-.include 'sysinfo.pasm'
-
-.sub VERSION :method
-    .local string version
-    version= '0.1'
-    .return( version )
-.end
-
-
-.sub '__onload' :load
-    '_init'()
-
-    .local string osname
-    osname= sysinfo .SYSINFO_PARROT_OS
-
-    .local string platform
-    platform= '_get_module'( osname )
-
-    '_load_lib'( platform )
-
-    .local string baseclass
-    concat baseclass, 'File::Spec::', platform
-
-    ## make this class a subclass of the base class
-    .local pmc self
-    subclass self, baseclass, 'File::Spec'
-
-    .return()
-.end
-
-
-.sub '_init'
-    .local pmc modules
-    modules= new 'Hash'
-
-    ## TODO implement the other platforms
-    set modules['MSWin32'], 'Win32'
-    set modules['NetWare'], 'Win32'
-    ## set modules['MacOS'], 'Mac'
-    ## set modules['os2'], 'OS2'
-    ## set modules['VMS'], 'VMS'
-    ## set modules['epoc'], 'Epoc'
-    ## set modules['dos'], 'OS2'
-    ## set modules['cygwin'], 'Cygwin'
-
-    set_global '_modules', modules
-.end
-
-
-.sub '_get_module'
-    .param string osname
-
-    .local pmc modules
-    modules= new 'Hash'
-
-    modules= get_global '_modules'
-
-    .local string module
-    module= modules[ osname ]
-
-    ne '', module, found_module
-    module= 'Unix'
-
-found_module:
-    .return( module )
-.end
-
-
-.sub '_load_lib'
-    .param string module
-
-    .local string filename
-    .local string libname
-
-    concat filename, module, ".pir"
-    concat libname, "File/Spec/", filename
-    load_bytecode libname
-
-    .return()
-.end
-
-
-.sub '__isa' :method
-    .local pmc sub
-    .local string name
-
-    typeof name, self
-
-    .local string osname
-    osname= sysinfo .SYSINFO_PARROT_OS
-
-    .local string module
-    module= '_get_module'( osname )
-
-    .local pmc platform
-    platform= new 'String'
-    platform= module
-
-    .local pmc class
-    class= new 'String'
-    class= name
-
-    concat class, class, '::'
-    concat class, class, platform
-    .return(class)
-.end
-
-# Local Variables:
-#   mode: pir
-#   fill-column: 100
-# End:
-# vim: expandtab shiftwidth=4 ft=pir:

Deleted: trunk/t/library/File_Spec.t
==============================================================================
--- trunk/t/library/File_Spec.t	Wed Feb 18 18:35:51 2009	(r36859)
+++ /dev/null	00:00:00 1970	(deleted)
@@ -1,105 +0,0 @@
-#! parrot
-# Copyright (C) 2001-2009, Parrot Foundation.
-# $Id$
-
-=head1 NAME
-
-t/library/File_Spec.t - test File::Spec module
-
-=head1 SYNOPSIS
-
-    % prove t/library/File_Spec.t
-
-=head1 DESCRIPTION
-
-Tests file specifications.
-
-=cut
-
-##############################
-# File::Spec
-
-.sub main :main
-    .include 'test_more.pir'
-    plan(22)
-
-    FS_load_bytecode()
-    FS_new()
-    FS_can()
-    FS_isa()
-    FS_version()
-    FS_private_subs()
-.end
-
-.sub FS_load_bytecode
-    load_bytecode 'File/Spec.pir'
-    ok(1, 'load_bytecode')
-.end
-
-.sub FS_new
-    .local pmc spec
-
-    spec = new 'File::Spec'
-    ok(1, 'new')
-.end
-
-.sub FS_can
-    .local pmc spec
-    .local pmc method_list
-
-    $S0 = '__isa VERSION devnull tmpdir case_tolerant file_name_is_absolute '
-    $S0 = concat $S0, 'catfile catdir path canonpath splitpath splitdir '
-    $S0 = concat $S0, 'catpath abs2rel rel2abs'
-    method_list = split ' ', $S0
-
-    spec = new 'File::Spec'
-
-  LOOP:
-    $I0 = elements method_list
-    if $I0 == 0 goto END_TEST
-    $S0 = method_list.'shift'()
-    $I0 = can spec, $S0
-    $S1 = concat 'File::Spec can ', $S0
-    ok($I0, $S1)
-    goto LOOP
-
-  END_TEST:
-.end
-
-.sub FS_isa
-    .local pmc spec
-
-    spec = new 'File::Spec'
-    isa_ok(spec, 'File::Spec')
-    $S0 = spec.'__isa'()
-    like($S0, "File '::' Spec '::' .+", 'The object isa File::Spec::.+')
-.end
-
-.sub FS_version
-    .local pmc spec
-
-    spec = new 'File::Spec'
-    $S0 = spec.'VERSION'()
-    is($S0, '0.1', 'VERSION 0.1')
-.end
-
-.sub FS_private_subs
-    .local pmc spec
-
-    spec = new 'File::Spec'
-    .local string module
-    .local pmc get_module
-    get_module = get_hll_global [ 'File::Spec' ], '_get_module'
-
-    module = get_module( 'MSWin32' )
-    is(module, 'Win32', 'File::Spec module for MSWin32 is Win32')
-
-    module = get_module( 'foobar' )
-    is(module, 'Unix',  'File::Spec module for foobar is Unix')
-.end
-
-# Local Variables:
-#   mode: pir
-#   fill-column: 100
-# End:
-# vim: expandtab shiftwidth=4 ft=pir:


More information about the parrot-commits mailing list