Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[GH #877] Removed Parrot::Revision

Now that the dependencies on Parrot::Revision have been removed, it's now
possible to remove Parrot::Revision itself.  The tests pass, so all is good.
  • Loading branch information...
commit 94df5d8d7c225f2134df54f76b365e9ba1b186cd 1 parent 7bb92e8
Paul Cochrane paultcochrane authored
Showing with 0 additions and 89 deletions.
  1. +0 −1  MANIFEST
  2. +0 −88 lib/Parrot/Revision.pm
1  MANIFEST
View
@@ -1040,7 +1040,6 @@ lib/Parrot/Pmc2c/Parser.pm [devel]lib
lib/Parrot/Pmc2c/Pmc2cMain.pm [devel]lib
lib/Parrot/Pmc2c/UtilFunctions.pm [devel]lib
lib/Parrot/Pmc2c/VTable.pm [devel]lib
-lib/Parrot/Revision.pm [devel]lib
lib/Parrot/SHA1.pm [devel]lib
lib/Parrot/SearchOps.pm [devel]lib
lib/Parrot/Test.pm [devel]lib
88 lib/Parrot/Revision.pm
View
@@ -1,88 +0,0 @@
-# Copyright (C) 2005-2011, Parrot Foundation.
-
-=head1 NAME
-
-Parrot::Revision - Revision number of Parrot
-
-B<Note:> This package is largely obsolete, as the Git version control system
-does not use a continually incrementing integer to designate a particular
-revision, as our previous CVS and Subversion VCSes did. We retain it for
-backwards compatibility for certain high-level languages built on top of
-Parrot.
-
-=head1 SYNOPSIS
-
- use Parrot::Revision;
-
- print $Parrot::Revision::current;
-
-=head1 DESCRIPTION
-
-Get parrot's current and configure time revision.
-
-We currently always return "1" to tell old HLL's that this version of Parrot is too new for them.
-There is currently no way to say "we are too new for you", so we have to lie again and say we are
-too old.
-
-=cut
-
-package Parrot::Revision;
-
-use strict;
-use warnings;
-use lib qw( lib );
-use Parrot::Configure::Utils qw( :cache );
-
-our $cache = q{.parrot_current_rev};
-
-our $current = _get_revision();
-
-sub update {
- my $prev = _get_revision();
- my $revision = 1;
- $current = _handle_update( {
- prev => $prev,
- revision => $revision,
- cache => $cache,
- current => $current,
- } );
-}
-
-sub _handle_update {
- my $args = shift;
- if (! defined $args->{revision}) {
- $args->{revision} = 'unknown';
- print_to_cache($args->{cache}, $args->{revision});
- return $args->{revision};
- }
- else {
- if (defined ($args->{prev}) && ($args->{revision} ne $args->{prev})) {
- print_to_cache($args->{cache}, $args->{revision});
- return $args->{revision};
- }
- else {
- return $args->{current};
- }
- }
-}
-
-sub _get_revision {
- my $revision;
- if (-f $cache) {
- $revision = read_from_cache($cache);
- }
- else {
- $revision = 1;
- print_to_cache($cache, $revision);
- }
- return $revision;
-}
-
-1;
-
-# Local Variables:
-# mode: cperl
-# cperl-indent-level: 4
-# fill-column: 100
-# End:
-# vim: expandtab shiftwidth=4:
Please sign in to comment.
Something went wrong with that request. Please try again.